Re: Container



Thank you for the help.
Can i get a look at some example programs implementing this.

Regards
Rafeeq
----- Original Message ----- 
From: "rob" <mailingLists pangolin org uk>
To: <rafeeqce myiris com>
Cc: "gtk list" <gtk-app-devel-list gnome org>
Sent: Sunday, December 23, 2001 6:34 AM
Subject: Re: Container


On Sat, 2001-12-22 at 21:27, Rafeeq C E wrote:
Hi all,
I have 5 text boxes and a combo box on a GTK
window. The "changed" event handler for combo
box searches for the selected value in database
and displays related infotmation in the text
boxes. I am stuck at this point. The text boxes
cannot be made global. If they were global, I
could have used them in the event handler
function. Is there any way by which I can 
access the components through their container?
 
 Regards
 Rafeeq C E
 

There are lots of ways to do this.
You could get at them through the container use 
gtk_container_children(myContainer)  
this gives you a glist of the children. Doing this is a pain as if your
ui changes it'll break.

If your using glade the simpleist way is just to use 
lookup_widget(myApp, myWidgetsName)
if your not using glade then either:

use the  userData bit of the callback (if you want to to pass more than
1 argument just stick them in a struct)

stick a pointer to them in the instance struct

attach them to a convinent object with gtk_object_set_data

i'd stick a pointer in the instance struct but it probably dosn't matter
much.

hope this helps
  

________________________________________________________________

This message was sent using Myiris Mail
For more information visit http://mail.myiris.com

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 

rob

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]