Re: setting GtkTextView to a fixed size



On Sun, Dec 22, 2002 at 10:38:08AM +0100, Marcus vA wrote:

can anyone tell me, how to set a GtkTextView to a fixed size?
I want to have a window at a fixed size, so that the user can scroll
within the GtkTextView, but does not resize. A
gtk_widget_size_request neither on the window nor on the TextView does
work (it just coredumps). Is there any possibility to do this?


You have to set the size request (gtk_widget_set_size_request()),
and then pack the textview in containers such that it always gets its
minimum size, instead of any additional size. Typically this means
making the toplevel window not resizable, or picking another widget 
to absorb extra space if the toplevel is resized.

Havoc



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