Re: [gtk-list] Re: widget name




Oops, didn't notice gtk_widget_set_name().  Nevermind
my suggestion if its not applicable.

-Jamie

On Fri, 24 Mar 2000, Jamie Guinan wrote:

> 
> On Fri, 24 Mar 2000 didi@altatech.com wrote:
> 
> > I create several buttons and set names for them.
> 
> You mean like "gtk_button_new_with_label()"?
> 
> > Can I later in different function reach the button using it's name?
> 
> Maybe you could use the g_hash_table functions.
> 
>   h = g_hash_table_new(...);
>   g_hash_table_insert(h, buttonName, buttonWidget);
>   
> (later...)
>   someButtonWidget = g_hash_table_lookup(h, buttonName);
> 
> Just a thought.  I don't think Gtk tracks things by name on its own.
> 
> http://developer.gnome.org/doc/API/glib/glib-hash-tables.html
> 
> -Jamie
> 
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 



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