[gtkada] Notebook question
Preben Randhol
randhol at pvv.org
Tue Oct 8 14:25:22 CEST 2002
manuel.op.de.coul at eon-benelux.com wrote on 08/10/2002 (13:43) :
> >I'm a bit confused with your design. If you have only one widget why do
> >you use a notebook in the first place?
>
> I my program I have an array of objects that
> the user interacts with. I wanted to use a
> notebook to show a text representation of them,
> one at a time. The tabs allow a quick selection
> of the object. I also have a spinbutton for the
> object number, which is connected to the notebook
> tabs.
Ok I'm not sure I understand but lets look at an example (you must view
this with monospace fonts like courier).
Say you have a program teaching about fruits. You have apples, oranges
and bananas. When you press on a tab you get a picture of the fruit and
some information about the fruit in a Text widget.
I would have designed this like this:
a hbox where I pack a notebook and a textwidget:
---------------------------------------------------------------
| _____ ______ ______ |
| |Apple|Orange|Banana| --------------------------------- |
| |---------------------- | The first trees to produce |^| |
| | | | sweet, flavourful apples |#| |
| | ,--./,-. | | similar to those we enjoy |#| |
| | / # \ | | today, were located many |#| |
| | | | | | thousands of years ago near | | |
| | \ / | | the modern city of Alma-Ata,| | |
| | `._,._,' | | Kazakhstan. | | |
| | | | | | |
| ----------------------- | The Greeks were growing | | |
| | several varieties of apples | | |
| | by the late 300's BC, and |v| |
| --------------------------------- |
---------------------------------------------------------------
And then every time one jump to a new page the text widget that is
outside the notbook gets new text. Thought I might have misunderstood
your program.
--
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
«For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list