RE: Centering text in a treeview



В Срд, 23/05/2007 в 18:44 +0100, John Spray пишет:
> On Wed, 2007-05-23 at 08:25 -0400, Jim Barnes wrote:
> > You should be able to set the alignment using the
> > Gtk::TreeViewColumn::set_alignment(Gtk::Alignment) even with using a
> > cellrenderertext object.
> 
> Unfortunately calling TreeViewColumn::set_alignment sets the alignment
> of the column header rather than the contents.

There is all what you need if you read Gtk::CellRenderer class doc
file...

The property you need to set is property_xalign() = 0.0 ... 0.5 ... 1.0
(left ... center ... right). Regardless the docs say it is ReadOnly,
property works pretty well for me.

-andrew





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