Re: Setting the right size



On 23 Aug 2000, Anders Melchiorsen wrote:

 Hi,
> 
> Hi,
> 
> how do I make a GtkText be just tall enough to contain exactly two
> lines of text? (Preferably by some setting available from Glade :-)
> 
> Using two labels or entry widgets is not really an options since the
> style should be similar to a larger, scrollable text output that I
> have.

 Just measure the height of font GtkText will use (seems it's in
GTK_WIDGET(text)->style->font), compute how much it will need for two lines
exactly (study all those details), and 
	gtk_widget_set_usize(text,-1,proper_height);
 If it's really only "text output" as you called - then you may use GtkLabel -
it allows multiline labels (and it allows underlining text).

> -- 
> Regards, Anders
> 

 Best regards,
  -Vlad






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