Re: Locating child-widgets (by name) without Glade-code



Hello,

 I don't know for what reason do you want to locate your widgets, but in my
 case I used gtk_container_get_focus_chain() and 
 gtk_container_set_focus_chain().
 You can pre-define order of your widgets and "save" the order to the
 container using set() function. When needed, the list can be obtained by
 get() function. As you have pre-defined the order, you can be sure about
 it and search it safely... (I am not sure how it works with
 gtk_container_get_children())

 It is neither fast nor clean, but it can help if you don't want to use a
 lot of global variables.

 One more thing is worth to say - I didn't realized that this approach
 doesn't work for widgets, which can't be focused... (thanks Waldek)

Regards, 
Michal



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