[Glade-users] problem on GTK_combo_box_entry.

On Sun, 2004-08-08 at 15:42, SBBG wrote:
Hello there,
   I'm a rookie to Glade. I got some problem when I tried to deal with
combo box entry.
   I tried to lookup the widget like this line:

GtkWidget *Sex= lookup_widget( GTK_WIDGET(button), "comboboxSex" );

  It seems nothing went wrong in both compiling and excution.
But when I tried to refer to the text by this line:

current.sex= gtk_entry_get_text ( GTK_ENTRY( GTK_COMBO(Sex)->entry ) );

You used GTK_COMBO() there, but it isn't a GtkCombo.


  current.sex= gtk_entry_get_text ( GTK_ENTRY( GTK_BIN(Sex)->child ) );

A GtkComboBoxEntry is a subclass of GtkBin, a container with one child.
For GtkComboBoxEntry, the child is a GtkEntry.


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