[Glade-users] Gtk2ComboBox with Glade2
Ashwin Ramachandran
rashwin28 at gmail.com
Wed Nov 1 13:11:25 EST 2006
Hi All,
I used a Gtk2ComboBox in my Glade[Glade2] file and am using libglade to
connect to my Perl-gtk2 application.
I am not able to see the popdown strings in my combobox, even after
attaching the strings
to the combobox. Am using Gtk Version 2.6 and Glade2.
Here is that piece of code:
# Get the combo box widget from the glade object
# I have not defined any combo entries[ie Items] for the combobox in glade,
since
# they are runtime entries
my $combo_box = $Main_Glade_Ref->get_widget("ComboBox");
# Without using the new_text API, warnings are observed
# So, Using the new_text API to get the text combo box
$combo_box_text = $combo_box->new_text();
#Set the popdown strings
@popdown_strings = ("ACCESS", "STATUS", "DUMMY");
foreach my $string (@popdown_strings) {
$combo_box_text->append_text($string);
}
$combo_box_text->set_active(0);
At run time, I can see only the combo widget displayed, but not the popdown
strings.
Am I missing something here?
Thanks in Advance,
Ashwin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20061101/47c10ed6/attachment.html
More information about the Glade-users
mailing list