Is it possible to get widget from it's id

Dear all,

is it possible to get widget from its id?

to be clear, what I intent to do is something like below

def widget_by_id_do_something(widget_id)
widget(widget_id).do_something
end

hi

hendra kusuma wrote:

is it possible to get widget from its id?

Yes, Wx:Window.find_by_id

http://wxruby.rubyforge.org/doc/window.html#Window_findwindowbyid

It’s documented as an instance method, but I think it’s a class method:

win = Wx::Window.find_by_id(ID_FOO)

alex

On Tue, Dec 15, 2009 at 2:14 AM, Alex F. [email protected] wrote:

http://wxruby.rubyforge.org/doc/window.html#Window_findwindowbyid

It’s documented as an instance method, but I think it’s a class method:

win = Wx::Window.find_by_id(ID_FOO)

alex

Whoa, cool
Thanks man