From: Joe V. D. <joe...@gm...> - 2006-01-24 21:45:18
|
On 1/24/06, Joe Van Dyk <joe...@gm...> wrote: > On 1/20/06, Joe Van Dyk <joe...@gm...> wrote: > > I'm going crazy looking over the documentation for Gtk::TreeViewColumn > > (http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3ATreeViewColumn). > > > > When the TreeView comes up, I want the first column to be sorted > > automatically (ascending). > > > > > > col =3D Gtk::TreeViewColumn.new(title, renderer, :text =3D> 0) > > col.sort_indicator =3D true > > col.sort_column_id =3D 0 > > col.sort_order =3D Gtk::SORT_ASCENDING # Wouldn't this work? > > > > > > That's what I have. I can click on the column titles to sort the > > rows, but the first row is not sorted by default. > > > > What am I missing? > > Any ideas? I really need the row sorted ascending by default when the > application comes up. Aha, fixed. Not sure if it's the "correct" way to do it, but doing: @view.get_column(0).clicked did the trick. (I wanted the first column sorted) |