tags:

views:

23

answers:

1

I'm brand new to wxRuby, and just trying to figure things out. How do I change the style of the TextCtrl after it has been created.

tb = Wx::TextCtrl.new(panel, -1, :style => Wx::TE_PASSWORD)

Sets the text input properly, but is it possible to change this property after it has been created?

tb = Wx::TextCtrl.new(panel, -1)
tb.set_window_style(Wx::TE_PASSWORD)

Does nothing, and subbing in set_style or set_default_style each throw errors.

A: 

I think that the set_style method is intended to change the styling of the text itself, not the style of the textctrl. I've been trying to find an example of changing the style of the textctrl, but I haven't found anything yet.

phoffer