Re: Gtk2::TreeView or Gtk2::SimpleList right justify?



On Fri, 2003-08-08 at 08:53, muppet wrote:
Guillaume Cottenceau said:
Tom Cross <tomc kendeco com> writes:

I can't find how to make a column (of numbers) right justify when I'm
using a TreeView or (even better) SimpleList.  Is there a way to do
this?

If using a TreeView, the following is probably the solution:

http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html#gtk-tree-view-column-set-alignment

there you go.  and you retrieve TreeViewColumns from a TreeView with
->get_column(n) or ->get_columns... so this should work:

  # right align column number $col_no
  $treeview->get_column ($col_no)->set_alignment (1.0);

since a SimpleList is a TreeView, you can call that on a SimpleList, as well. 
as that's rather straightforward, i think it's silly to try to "simplify" that
with a SimpleList method.

Hmm... That makes the column header right justify, but not the actual
column info... :-(   It still left justifies if I have it as a 'int'
column or a 'text' column.  Do I need to make my own textrender thingy?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]