Re: Setting the right size
- From: Vlad Harchev <hvv hippo ru>
- To: Anders Melchiorsen <and kampsax dtu dk>
- Cc: gtk-list gnome org
- Subject: Re: Setting the right size
- Date: Wed, 23 Aug 2000 20:25:05 +0500 (SAMST)
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]