[Glade-users] Setting sort column ID for GtkTreeViewColumn
- From: tadeboro at gmail.com (Tadej Borovšak)
- Subject: [Glade-users] Setting sort column ID for GtkTreeViewColumn
- Date: Thu, 3 Dec 2009 14:33:44 +0100
Hello.
Is there a way of specifying the sort column ID for a
GtkTreeViewColumn in Glade 3?
Last property under general tab controls this. I attached simple glade
file that demonstrates how to set this property.
---- CODE ----
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window1">
<child>
<object class="GtkTreeView" id="treeview1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">liststore1</property>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="title">column</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="title">column</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
<property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name col1 -->
<column type="gint"/>
<!-- column-name col2 -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0">1</col>
<col id="1">7</col>
</row>
<row>
<col id="0">2</col>
<col id="1">6</col>
</row>
<row>
<col id="0">3</col>
<col id="1">5</col>
</row>
<row>
<col id="0">4</col>
<col id="1">4</col>
</row>
<row>
<col id="0">5</col>
<col id="1">3</col>
</row>
<row>
<col id="0">6</col>
<col id="1">2</col>
</row>
</data>
</object>
</interface>
---- CODE ----
Tadej
--
Tadej Borov?ak
tadeboro.blogspot.com
tadeboro at gmail.com
tadej.borovsak at gmail.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]