Hello,
I'm trying hard to find out if reusing of widgets is impossible
or if I do a big mistake.
The following code will fail:
label=gtk_label_new("button"); /* define a label */
gtk_widget_show(label);
buttonA = gtk_button_new();
gtk_container_add(GTK_CONTAINER(buttonA),label); /* add it to BUTTON-A */
buttonB =gtk_button_new();
gtk_container_add(GTK_CONTAINER(buttonB),label); /* add it to BUTTON-B */
Reuse of a label may not save to much memory, but there are other
situations like reuse of a toggle button which should be accesible from
two pages of a notebook or having the same drawingarea on two notebook
pages.
I could not find any hint in the FAQ or any other gtk tutorial,
also browsing through the list failed, may be I missed it?
Thanks for help!
Sebastian
---------------------------
DP Sebastian Tannert / [EMAIL PROTECTED] / 030/2093 7648
Humboldt Universit"at Berlin / Institut f"ur Physik / AG Photobiophysik
Invalidenstrasse 110 / D-10115 Berlin
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list