[Chandler-dev] setting focus method

John Anderson john at osafoundation.org
Sun Sep 24 14:57:13 PDT 2006


I've always used
 
self.widget.SetFocus()

To really succeed at overriding the method on the widget I suspect 
you'll have to add a widgets handler, e.g.:

        self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)

and implement OnSetFocus, as is done elsewhere in Chandler

And in that case it probably doesn't matter which form you use.

John

Reid Ellis wrote:
> I noticed code that says this:
>     wx.Window.SetFocus(self.widget)
>
> is there a reason for not using this?
>     self.widget.SetFocus()
>
> The latter allows the object to override the method, y'see.
>
> Reid
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "chandler-dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/chandler-dev


More information about the chandler-dev mailing list