I’m currently trying to write a Ruby program using Tk that requires the
use of multiple files and windows. For instance, I have a main screen,
and when I click on one of the buttons, I want the main window to close
and a new window to open. The code for these windows is located in
different files (but if possible I could put them all in one). So far
all I’ve been able to do is get the second window to attach itself onto
the first, resulting in a very ugly looking GUI. How can I get the Tk
interface to let me close one window and open another with a button
click or similar event?
Thanks in advance to any help anyone can offer.