[gtkada] "Modebook"

Preben Randhol randhol at pvv.org
Fri Jan 23 13:14:57 CET 2004


Hi

I've noticed that it is very useful to be able to be able to switch
between "modes" in a program. Say one have a mode where one edit some
text/graphics etc... then one have a mode for listing/viewing and
another for doing other things. What I have done so far is to remove the
Vbox I have packed each "mode" in and then put the new mode when I'm
going from one mode to the other. As I found out it would be better to
simply use a notebook without fans as one do not need to do this
removing adding all the time. However, the problem with notebooks are
that it is more difficult to find the correct page in them.

So what I was thinking was to make a composite widget based on the
notebook. This widget will be generic so to use it you give an enumerate
of your modes and the corresponding pages are generated. I this way one
should be able to do a Gtk_Goto_Mode (Mode => Edit) without having to
worry about counting to the correct page etc... But before I start doing
any of this I wanted to hear if others have better ideas to do it.

Thanks in advance.

Preben
-- 
Preben Randhol -------------- http://www.pvv.org/~randhol/Ada95 --
                 «For me, Ada95 puts back the joy in programming.»



More information about the gtkada mailing list