tree view column sizing problem



I have a tree view with 3 columns, which sits within a scrolled 
window.  

The middle column contains what can be quite a lengthy string. 
When the user opens the window in question, I'd like her to be 
visually aware that the third column is there: the problem is that 
with the columns autosized, the length of the middle string can 
push the third column out of the visible zone (you have to scroll 
horizontally to reach it).

The ideal solution, I think, would be (a) set the starting width 
of the middle column to some reasonable maximum (when the window 
is first opened), but then (b) allow the user to expand it to read 
the full string if need be.

I can achieve (a) using gtk_tree_view_column_set_max_width() with 
a suitable second argument, but how to achieve (b)?  I have tried 
calling gtk_tree_view_column_set_max_width() with a second 
argument of -1 once the tree view is realized, but this results in 
the column immediately being autosized, making (a) useless.

I guess what I'm looking for is

 gtk_tree_view_column_set_width()

without the "max".  That function doesn't exist, but is there a 
way of doing it?  Thanks for any suggestions.

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC



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