This works (C):

int main(int a_argc,char **a_argv)
{
        GtkWidget *l_label;
        GtkRequisition l_req;
        
        gtk_init(&a_argc,&a_argv);
        
        l_label = gtk_label_new("hello");
        memset(&l_req,0,sizeof(GtkRequisition));
gtk_widget_size_request(l_label,&l_req); // not gtk_widget_get_size_request
        
        printf("%d %d\n",l_req.width,l_req.height);
        
        return 0;
}

Output: 31 17

Maybe in python is: gtk.Label.size_request()

Atentamente,

Jorge Opaso Pazos
AUTOLogic LTDA




El 06-08-2009, a las 21:33, cbx escribió:

I would like to know how to get and set the size of a label.
There seems no answer in the pygtk API(me using Python currently). gtk.Label.get_size_request() only return (-1,-1). Google doesn't give much information too. _______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to