Re: Get a Widget-Pointer
- From: Markus Lausser <sgop users sourceforge net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Get a Widget-Pointer
- Date: Wed, 2 May 2001 16:18:38 +0200
On Wed, May 02, 2001 at 01:22:05PM +0200 Lecomte Jean François wrote:
Konrad Mader <konrad mader gmx de> writes:
Hi,
After a 'create_Hauptfenster()' I want to use
gtk_clist_append(). How can I handle 'clist1'?
One way to do this is to use the lookup_widget defined in
support.h by glade (implemented in support.c).
void foo( )
{
GtkWidget *Haupt ;
GtkWidget *local_clist_ptr ;
Haupt = create_HauptFenster();
local_clist_ptr = lookup_widget (Haupt, "clist1");
}
It's documented in glade FAQ .
Beware of the fact,
you need a toplevel widget as first parameter in lookup_widget !
Or at least, a widget which contains your clist ;
No, thats not correct. You dont need a toplevel widget (at least not with
glade 0.5.11). YOu only need a widget inside the toplevel widget.
wanted_widget = lookup_widget(any_widget_inside_Haupt, "name_of_wanted_widget");
lookup_widget() traces to the toplevel widget and does a
gtk_object_get_data(top_level_object, "name_of_wanted_widget");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]