Re: name -> widget func?
- From: George Timmons <gwtim 2xtreme net>
- To: gtk-app-devel-list gnome org
- Subject: Re: name -> widget func?
- Date: Thu, 21 Dec 2000 12:49:17 -0800 (PST)
To get a specific widget, say in a window with other 300
widgets, use set_data/get_data functions, as in the following example:
when you create the button:
gtk_object_set_data (GTK_OBJECT (window), "my_button", button);
when you want it back:
button = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (window), "my_button");
Carlos
What if you wanted to use in integer instead of "my_button" in each case?
like:
for(i=0;i<count;i++)
button[i] = (GtkWidget *) gtk_object_get_data (GTK_OBJECT (window), i );
George
----- End of forwarded message from Carlos Pereira -----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]