Notebook page question/limiting number of widgets



Hello,

I have created an application that have a GTK notebook
with a dozen or so tabs.  Each tab contains the same
set of widgets.

For the sake of brevity, I'll provide an example:  

Each of my tabs contain an HBOX child widget, and in
each of those HBOX widgets I have a label.

What I am trying to prevent is creating a dozen
different sections of code to create each of those
dozen HBOX and label widgets.  I would like to use the
same few lines of code to create and access those
widgets, simply changing which container to pack them
in.

If my example code creates each label with the name
MyLabel, for example, and I cycle through this code to
create a dozen different labels in a dozen different
notebook pages using the MyLabel name, it works fine. 
However, I can no longer go back and access MyLabel by
name since it now points to the last label widget I
created.

Is there a way to point to a widget by referencing
it's parent widget, such as: NotebookTab[1]->MyLabel,
NotebookTab[2]->MyLabel, etc.

I know the '->' pointer reference does not work, but I
hope this provides the basis to explain what I am
trying to do.

Can anyone provide any information, or an alternative
way to do this, without having to make MyLabel1,
MyLabel2, MyLabel3, etc?????

Since I will have dozens of widgets within each
notebook page, if I have to create and name each
seperately, the code will grow to an unmanageable
size.

Thanks for any help!


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus ? Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]