RE: How to change the width of a GtkTreeView?



In my program I add the GtkTreeView to scrollable window. 
Then I try to
change the size of this "window" with gtk_widget_set_usize(), 
but nothing
happens. Could anyone please help me?

Just thought I'd mention it but:

Warning
gtk_widget_set_usize is deprecated and should not be used in newly-written
code.

see here:
http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-set-usi
ze

You should use gtk_widget_set_size_request() instead.

But I have also noticed this from time to time.  It is related to a number
of things being the data in your treeview and the number of columns to show
that data and how you set the treeview up.  Also the containers you use to
put your treeview into (i.e. do they have the correct shrink/resize
properties set etc...).

Mostly it is about what you set the properties of the containers to (for me
it was a vbox, scrollwindow and the main window itself).  Also, don't forget
that if you have other widgets which take up a certain width or height,
their combined minimum sizes will make up the minimum sizes for the window
unless they too are in a container which allows shrinking.

Regards,
Martyn




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