python - gtk liststore in glade - get column-names of liststore -
when creating gtk.liststore in glade, can add column names it. in .glade file looks this:
<object class="gtkliststore" id="liststore1"> <columns> <!-- column-name col1 --> <column type="gchararray"/> <!-- column-name col2 --> <column type="gchararray"/> </columns> <data> <row> <col id="0" translatable="yes">entry</col> </row> </data> </object> in python, loading glade file , getting liststore:
builder = gtk.builder() builder.add_from_file("file.glade") liststore = builder.get_object("liststore1") i can column types liststore.get_column_type(index), want column names (["col1", "col2"]) in glade file xml comments.
Comments
Post a Comment