Re: [gtk-list] widget name




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





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