Re: TreeView Queries

Hey Matt,

To set the alignment you must first get the cell renderer (Gtk::TreeView::Column::get_first_cell_renderer) and then set Gtk::CellRenderer::property_xalign to 0.5;

To set the width of a column use Gtk::TreeView::Column::set_fixed_width.

I hope this helps.

Bob Caryl

Matt Galloway wrote:


I've just started gtkmm programming and I have a couple of queries regarding Gtk::TreeView. They are as follows:

1) Is there anyway I can set the columns to have central alignment within the columns? i.e. Like this:
  Col 1  |  Col 2
    8    |   455
  Instead of:
  Col 1  |  Col 2
  8      |  455

2) Is there anyway I can set the width of the columns at startup? I don't want the user to be able to change them and that's fine, I've got that bit done.

Any help would be much appreciated!

Many thanks,
Matt Galloway
gtkmm-list mailing list
gtkmm-list gnome org

fn:Robert Caryl
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108

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