hi,
i have a small form with some textctrl. and i was wondering how to set
background of them when i write something on them.
i mean, i would like to give a another than default backgound color when
i set focus/write something.
thanks a lot in advance, because i have seen some posts, and everyone
has answered in a very gentile way. this is a thing that is missed in
other parts
thanks again
Hi
Gerard Rakoczy wrote:
i have a small form with some textctrl. and i was wondering how to set
background of them when i write something on them.
i mean, i would like to give a another than default backgound color when
i set focus/write something.
In the constructor for your TextCtrl, maybe something like:
evt_set_focus { self.background_colour = Wx::RED }
evt_kill_focus { self.background_colour = Wx::WHITE }
I’m not sure that on all platforms, the native TextCtrl is allowed to
change the background colour. But this works fine for me on OS X.
cheers
alex