Re: widget reuse question



Henri Torgemane wrote:
Sure you could keep adding and removing widgets to your container, but
your code would be messy and it probably wouldn't look good to the user.

We'll see about that... :P

How would you do it anyway? I've written the rest of the program to
handle it that way, so I'd like to try it...

Instead, you can use a GtkNotebook to do that very kind of stuff.
Put each of your step in a different page, hide the tabs and borders and
plug your Next and Back buttons to gtk_notebook_next_page and
gtk_notebook_prev_page.

I don't know how the GtkNotebook works (I'll look in the tutorial
later...). I assume that you would have to prepare every page before
showing it? Does this incur a performance or memory usage hit? I guess
it might not make any difference depending on how libgtk manages memory
and non-visible widgets.

Matthew




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