[Gtk-sharp-list] Don't do myframe.Add(mylabel) if it was already done

David Griffith dgriffi at cs.csubak.edu
Mon Feb 26 22:59:13 EST 2007


On Mon, 26 Feb 2007, David Griffith wrote:

> On Mon, 26 Feb 2007, Peter Johanson wrote:
>
> > One approach folks will use when doing something like what you are
> > describing is to use GtkNotebook with it's tabs set invisible, and then
> > simply switching pages of the notebook whenever a different "view" needs
> > to be presented to the user. This may be an easier approach than
> > removing and re-adding widgets constantly.
>
> These buttons along the left side will, among other things, fire off SQL
> queries or start the process of asking what sort of toppings the customer
> wants on a pizza.  Using GtkNotebook as you suggest would be okay for
> static displays, but not this.
>
> I see two ideal solutions:
>
> 1) Explicitly state that a widget should be put in container foo's nth
> slot.
>
> 2) Have a container return a reference of some sort to the widget
> contained in slot n, erasing what might have previously been there.
>
> Can either of these be done?  How?

Whoops.  That end phrase on item 2 should be on item 1:

"Explicitly state that a widget should be put in container foo's nth
slot, erasing what might have previously been there."


-- 
David Griffith
dgriffi at cs.csubak.edu

A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


More information about the Gtk-sharp-list mailing list