Thanks so much for the code. I think that is what I am looking for - I need
to understand what the routines you have provided do and their implications.
I will study them closely. My problem is, I can find some TK examples, but
it is hard to find corresponding Ruby/TK coding for the examples.

You are correct about the 'mind clarification' thing, tough to explain
something when you do not really have the tool-set knowledge in the first
place. But, we all start somewhere.

Here is a brief description of my application:

I am writing an Investment Manager application. This is comprised of a View
Manager, a Program Manager, a Spend Manager, an Account Manager, and perhaps
a Main Menu screen.

I am working on the View Manager right now. When started, it draws 12 months
on the screen starting with the current month - for example, right now it
shows March 2006 up to February 2007. All of the days are button widgets.
The View Manager will read a database file of spends in various programs.
When it finds spends that are due to mature for the 12 month view, the
appropriate day will be highlighted in green, and a textual description of
the spend will be displayed in a listbox at the bottom of the screen. I am
also considering to have this info displayed when you press a particular
highlighted day button. At the right of the screen or at the bottom,
depending on the available screen area, a selection box will list the
programs currently invested in. One will be able to set the 12 month view to
either all programs invested in or, it could show sub-sets of the current
programs. Also viewable on the same screen will be a section that shows the
money invested in each of the programs - a program status so to speak.

I haven't done this yet, but I would like the user to be able to select
either the View Manager screen, the Spend Manager screen, the Program
Manager screen or the Account Manager screen from a main screen that comes
up when you start the program. Or perhaps, a way to select the screens from
each of the manager screens. So from the View Manager screen, you could
choose to go to the Spend Manager screen, for example.

The Spend Manager screen would show a bunch of input text fields that would
enable you to make a spend in one of the programs curently available. It
would also allow you to edit/delete a particular spend. The Account Manager
Screen would have a bunch of input text fields that would enable you to
add/edit/delete an e-currency account in the current list - this is where
the Spend Manager gets the info on what account is being used to fund the
spend. The Program Manager would allow you to enter information into various
text fields about a new investment program,
as well as edit/update current program info.

Obviously, all of this stuff cannot fit on one screen. So I want to
functionally break-up my application per screen. The View Manager is almost
done, got the packing and class creation stuff down, but I do not have the
Ruby TK know-how yet on how to jump between screens - however, your code I
am sure will help.

Thanks again for your help,

Harry 

-----Original Message-----
From: Hidetoshi NAGAI [mailto:nagai / ai.kyutech.ac.jp] 
Sent: Thursday, March 09, 2006 11:44 AM
To: ruby-talk ML
Subject: Re: Looking for good reads on Ruby TK GUI programming

From: "Harry Truax" <htruax / stf.com>
Subject: Re: Looking for good reads on Ruby TK GUI programming
Date: Thu, 9 Mar 2006 23:12:58 +0900
Message-ID: <200603090912662.SM02816 / htruax>
> I basically want to switch between one or more windows, each window 
> takes up the whole screen, the user would enter/view data in each 
> window, basic GUI stuff.

First of all, you'll have to clarify the design concept of your GUI. 
# Probably, it will be clarified in your mind. ;-)

Do you mean the concept is such like as the following?
==========================================================================
require 'tk'

def window_setup(top)
  top.overrideredirect(true)
  top.geometry("#{top.winfo_screenwidth}x#{top.winfo_screenheight}+0+0")
  top.pack_propagate(false)
  TkFrame.new(top, :borderwidth=>2,
  :relief=>:ridge).pack(:expand=>:true)
end

Tk.root.lower # This is important. If all toplevel windows (not iconified or
              # withdrawn) are set overrideredirect flags, the application 
              # may not be able to get keyboard focus. So, keep the root 
              # widget under administration of window-manager, but put it 
              # lowest layer.

top0 = TkToplevel.new
top0_f = window_setup(top0)

top1 = TkToplevel.new
top1_f = window_setup(top1)

top2 = TkToplevel.new
top2_f = window_setup(top2)

Tk.update_idletasks
top0.raise

#-------------------------------------------------------------

v1 = TkVariable.new
v2 = TkVariable.new

#-------------------------------------------------------------
#  top2

TkLabel.new(top1_f, :text=>'edit STR1').pack
e1 = TkEntry.new(top1_f, :textvariable=>v1).pack(:side=>:left)
b1 = TkButton.new(top1_f, :text=>'OK', 
                  :command=>proc{top0.raise}).pack(:side=>:left)

e1.bind('Return', proc{b1.invoke})

#-------------------------------------------------------------
#  top2

TkLabel.new(top2_f, :text=>'edit STR2').pack
e2 = TkEntry.new(top2_f, :textvariable=>v2).pack(:side=>:left)
b2 = TkButton.new(top2_f, :text=>'OK', 
                  :command=>proc{top0.raise}).pack(:side=>:left)

e2.bind('Return', proc{b2.invoke})

#-------------------------------------------------------------
#  top0

TkFrame.new(top0_f){|f|
  TkLabel.new(f, :text=>'STR1:').pack(:side=>:left)
  l = TkLabel.new(f, :textvariable=>v1, :anchor=>:w, 
                  :width=>25, :relief=>:sunken).pack(:side=>:left)
  b = TkButton.new(f, :text=>'edit', :command=>proc{
                     top1.raise
                     e1.focus # or e1.focus(true) (if 'force' flag is
required)
                   }).pack(:side=>:left)
  l.bind('ButtonPress-1', proc{b.invoke}) }.pack

TkFrame.new(top0_f){|f|
  TkLabel.new(f, :text=>'STR2:').pack(:side=>:left)
  l = TkLabel.new(f, :textvariable=>v2, :anchor=>:w, 
                  :width=>25, :relief=>:sunken).pack(:side=>:left)
  b = TkButton.new(f, :text=>'edit', :command=>proc{
                     top2.raise
                     e2.focus # or e2.focus(true) (if 'force' flag is
required)
                   }).pack(:side=>:left)
  l.bind('ButtonPress-1', proc{b.invoke}) }.pack

TkButton.new(top0_f, :text=>'QUIT', :command=>proc{exit}).pack

#-------------------------------------------------------------

Tk.mainloop
==========================================================================
--
Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)