Forum: Ruby how to write reset method in Tk

73700e119917433681f2e8f3e4369f74?d=identicon&s=25 Li CN (alex-osu3)
on 2014-06-29 06:44
Hi all,

I have a small GUI/Tk with several buttons: start, next, prev, reset,
and exit.

It also contains several check_buttons which contain some default

When I press "start_button", it collects all the status of each
check_button and then do the job as I expect. My question is that how
can I write some codes for "reset_button" so that I can reset the
statuses of all widgets to the default settings after I press the

Thank you very much in advances.

The problem solved: I forget calling the method associated with "reset
button". I put this method into #initialize and I can reset the widgets.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.