Re: Setting the right size
- From: Anders Melchiorsen <and kampsax dtu dk>
- To: Vlad Harchev <hvv hippo ru>
- Cc: gtk-list gnome org
- Subject: Re: Setting the right size
- Date: 24 Aug 2000 05:49:19 +0200
Vlad Harchev <hvv@hippo.ru> wrote on 23-Aug-00:
> 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);
For the record, this seems to do the trick,
gtk_widget_realize(GTK_WIDGET(info));
int h = gdk_string_height(GTK_WIDGET(info)->style->font, "Åg");
gtk_widget_set_usize(GTK_WIDGET(info), -1, 4+2*h);
> If it's really only "text output" as you called - then you may use
> GtkLabel - it allows multiline labels (and it allows underlining
> text).
I like it as GtkText since it gives me the same style as other text
areas.
Thanks for your help.
--
Regards, Anders
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]