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;

http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1CellRenderer.html#c94be538d1c46649d7030771ef054f00

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

http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeViewColumn.html

I hope this helps.

Bob Caryl

Matt Galloway wrote:

Hey,

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
http://mail.gnome.org/mailman/listinfo/gtkmm-list


begin:vcard
fn:Robert Caryl
n:Caryl;Robert
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
x-mozilla-html:TRUE
url:http://www.fis-cal.com
version:2.1
end:vcard



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