[IronPython] MouseButtonDownEvent doesn't fire + which tool to work in?

Dan Eloff dan.eloff at gmail.com
Mon Dec 22 01:15:05 CET 2008


MouseLeftButtonDown is handled by the TextBox control, you cannot
handle the event unless you subclass TextBox and override
OnMouseLeftButtonDown.

-Dan

On Sun, Dec 21, 2008 at 1:31 PM, Kristian Jaksch
<kristian.jaksch at gmail.com> wrote:
> This is no all the code but even if I skip the 'if'-statement and have it
> like below:
>
> def inputBox_MouseLeftButtonDown(s, e):
>        root.inputBox.Text = ""
>
> it still doesn't work. And if I put a breakpoint at the "def
> inputBox_MouseLeftButtonDown(s, e):"-line it isn't fired.
>
>
> 2008/12/21 Curt Hagenlocher <curt at hagenlocher.org>
>>
>> How are you confirming that this doesn't fire?  If this is your exact
>> code, then it seems likely that it's actually throwing an exception --
>> isFirst will not be defined when the first line executes.
>>
>> On Sun, Dec 21, 2008 at 7:31 AM, xkrja <kristian.jaksch at gmail.com> wrote:
>>>
>>> I've the following code:
>>>
>>> def inputBox_MouseLeftButtonDown(s, e):
>>>    if isFirst == True:
>>>            root.inputBox.Text = ""
>>>            isFirst = False
>>>
>>> root.inputBox.MouseLeftButtonDown += inputBox_MouseLeftButtonDown
>>>
>>> Problem is the event doesn't fire when I click the inputBox (which is a
>>> textbox). The debugger doesn't say anything. I have another event handler
>>> and that one works fine:
>>>
>>> root.inputBox.KeyDown += inputBox_KeyDown
>>>
>>> Anyone has any idea what's wrong with the MouseLeftButtonDown event?
>>>
>>>
>>> Another question: Which tool do you guys say is the best for developing
>>> IronPython + Silverlight apps? I find it hard in Visual Studio since the
>>> debugger only lets you step through the code but you can't see any
>>> variable
>>> values.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/MouseButtonDownEvent-doesn%27t-fire-%2B-which-tool-to-work-in--tp21115998p21115998.html
>>> Sent from the IronPython mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.ironpython.com
>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>



More information about the Ironpython-users mailing list