Re: Passing data
- From: Jean-Max Redonnet <jmax redonnet meca insa-tlse fr>
- To: gtk-app-devel-list gnome org
- Cc: "Ian Frawley" <ifrawley opaltelecom co uk>
- Subject: Re: Passing data
- Date: Thu, 14 Jun 2001 17:14:49 +0200
Le Jeudi 14 Juin 2001 16:51, vous avez écrit :
Hi
How do I pass text from a number of entry widgets to a function from a
signal handler for one button without making the entry widget global.
and if I use a function that creates a hbox sticks some entry widgets in it
and returns it to main how do I access the widgets embedded within the
returned hbox.
Hope the above makes sense :-)
Thanks
I'm not sure I have understood the whole problem, but I will try to answer.
IMHO you should attach your text to a widget you can retrieve from the button.
1 - you attach the text to widget *wid using
gtk_object_set_data(GTK_OBJECT(wid), "text", text);
2 - in the button callback you retrieve this widget (using glade, you can use
lookup_widget function)
3 - you get back your text using
gtk_object_get_data(GTK_OBJECT(wid), "text");
Hope this help you.
jmr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]