Widget reusing
- From: Sebastian Tannert <tannert physik hu-berlin de>
- To: gtk-list gnome org
- Subject: Widget reusing
- Date: Tue, 3 Dec 2002 14:49:57 +0100 (CET)
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 / tannert physik hu-berlin de / 030/2093 7648
Humboldt Universit"at Berlin / Institut f"ur Physik / AG Photobiophysik
Invalidenstrasse 110 / D-10115 Berlin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]