[wxruby-users] How to refresh a panel?
Omar Hernandez
lists at ruby-forum.com
Thu Nov 13 19:22:43 EST 2008
Hello again
This time i have a problem with this code
Well, what i'm trying to do is, through a menu, to change panels.
The problem is that i can't find a way to change the panel, or refresh
or delete, or whatever should be done.
i've attached the the zip file with the runable code
the code is:
##on 'def initialize' of a Wx::Frame class
#@Panel=Panel.new(self)##If i initialize @panel here, it doesn't refresh
when the event is called
###end initialize
###event functions##
def cState(menu)##the function called from the event
#@panel.destroy ## Error: undefined method `destroy' for
nil:NilClass (NoMethodError)
@panel=Test.new(self)##a WX::Panel class.
end
##the other function is similar to this one
###end event functions
if i'm doing the wrong way, please tellme, and if possible, post a link
to an example, tutorial or explanation. I'd be very thankful
Ramo
Attachments:
http://www.ruby-forum.com/attachment/2928/testPrincipal.zip
--
Posted via http://www.ruby-forum.com/.
More information about the wxruby-users
mailing list