[Glade-users] simple comboboxentry app fails
- From: jmouriz at gmail.com (Juan Manuel Mouriz)
- Subject: [Glade-users] simple comboboxentry app fails
- Date: Wed, 21 Apr 2010 11:57:06 +0000
2010/4/19 Mathew Yeates <mat.yeates at gmail.com>:
Why is this failing?
import gtk
builder = gtk.Builder()
builder.add_from_file("cbe.glade")
win=builder.get_object("window1")
win.connect("destroy", lambda x: gtk.main_quit())
win.show()
gtk.main()
<?xml version="1.0"?>
<interface>
??<requires lib="gtk+" version="2.16"/>
??<!-- interface-naming-policy project-wide -->
??<object class="GtkWindow" id="window1">
?? ?<child>
?? ? ?<object class="GtkComboBoxEntry" id="comboboxentry1">
?? ? ? ?<property name="visible">True</property>
?? ? ?</object>
?? ?</child>
??</object>
??<object class="GtkListStore" id="liststore1">
?? ?<columns>
?? ? ?<!-- column-name col1 -->
?? ? ?<column type="gchararray"/>
?? ?</columns>
?? ?<data>
?? ? ?<row>
?? ? ? ?<col id="0" translatable="yes">dog</col>
?? ? ?</row>
?? ? ?<row>
?? ? ? ?<col id="0" translatable="yes">cat</col>
?? ? ?</row>
?? ?</data>
??</object>
</interface>
_______________________________________________
Glade-users maillist ?- ?Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users
You must associate ListStore to ComboBox:
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window1">
<child>
<object class="GtkComboBoxEntry" id="comboboxentry1">
<property name="visible">True</property>
<property name="model">liststore1</property>
<property name="text_column">0</property>
</object>
</child>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name col1 -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">dog</col>
</row>
<row>
<col id="0" translatable="yes">cat</col>
</row>
</data>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]