[wxruby-users] background for textctrl
Alex Fenton
alex at pressure.to
Tue Apr 15 18:14:19 EDT 2008
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
More information about the wxruby-users
mailing list