How to set a wx.textctrl can editable or readonly?

Tim Chase python.list at tim.thechases.com
Wed Jan 18 09:51:55 EST 2006


>     def onGotFocus(self,evt):
>         if readonly:
>             self.Navigate()
> 
> This causes the control to react as if the user press 'tab'. By default
> it always tabs forwards, but it takes an optional 'IsForward' argument
> - set it to False to tab backwards.

Just a pedantic query, not having wx under my fingertips at the 
moment...what happens if you three controls, A (r/w), B 
(read-only), and C (r/w) in that focus order...if use shift+tab 
in control C, does it properly go back to A, or does it move you 
forward again to control C.

Additionally, you should be able to copy text from a read-only 
control, so ousting the focus may not be quite the right thing to do.

Just a few random thoughts,

-tim at youcanneverhavetoomanypeoplenamedtim.com








More information about the Python-list mailing list