[wxPython-users] XML subclassing and wx.lib.masked.TimeCtrl
Basil Shubin
bashu at yandex.ru
Tue Sep 5 05:57:23 PDT 2006
Robin Dunn wrote:
> Basil Shubin wrote:
>
>>
>> # get masked controls start/finish time
>> self.startTime = xrc.XRCCTRL(self.parent, 'startTime')
>> self.finishTime = xrc.XRCCTRL(self.parent, 'finishTime')
>>
>> Questions is: which event I should catch when the text in a control
>> updated
>
> AS shown in the demo, use EVT_TIMEUPDATE
>
>
>> and how I can get access to self.timeCtrl?
>
> Just like you showed above with XRCCTRL
>
>> How to set event handler for self.timeCtrl that is inside the other
>> class?
>
> The same as you would for any control. Get a reference to the control
> and call its Bind method.
For the above example I make following changes:
self.parent.Bind(wx.lib.masked.EVT_TIMEUPDATE,
self.OnTimeUpdate,
self.startTime.timeCtrl)
and I recive an error:
AttributeError: 'WorkoutTime' object has no attribute 'timeCtrl'
What is my fault?
More information about the wxpython-users
mailing list