[gtkmm] Right justified TreeView column - restricting expansion of final column



> CellRenderer has property xalign():
> renderer->property_xalign() = 0; // left justify
> renderer->property_xalign() = 0.5; // center
> renderer->property_xalign() = 1; // right justify

Thanks!

Another question please - if the right-most column in a TreeView has to be
right justified, what is the best way to restrict it's width to something so
it doesn't end up right-justified in the left-over space the the TreeView
doesn't need?
eg. (approx) if a window is 1000 wide, and there are five columns which only
need to be 100 each, the fifth ends up 600 wide, and right-justified in it.
I want it to be right justified in only the space that it needs (say 100),
with the blank space (say 500) to the right.
I tried some combinations of these properties of cell_renderer:
  property_width
  property_is_expander
  property_is_expanded
but couldn't get it to work.

I have gotten around this by adding a new blank column as the final column
which gets expanded to the left-over space, but that required a blank field
in the model too, and doesn't seem the most elegant solution.

Dan






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