Re: gtk-app-devel-list digest, Vol 1 #994 - 11 msgs



If you want to know how to get the size of a label (or some widget), you can 
use the function

void gtk_widget_size_request (GtkWidget *widget, GtkRequisition *req);

In the struct req you can find the width and the height of the label

struct GtkRequisition
{
  gint16 width;
  gint16 height;
};

Regards, Victor


El Jue 11 Jul 2002 09:52, gtk-app-devel-list-request gnome org escribió:
> Hi!
>
>
> I have a little question: I want to create a label with a fixed width.
> The width should be large enough to contain n characters and it should
> be dependant on the font the user has set up. So my question is: how can
> I achieve this? I thaught about some like creating a label with the
> string "XX..X" and then getting the size of the label, but I can't
> figure out how to get the size of the label widget.
>
>
> Thanks for your help,




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