Re: Gtk::Widget::get_width Caveats?



Try Gtk::Widget::get_allocation() instead,
http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#a6499c4b69ff2e4671da95fdec97f62d

On 8/28/07, John Hobbs <john velvetcache org> wrote:
> Hello all,
>
>   I've been trying to use get_width and haven't had much luck.  I'm using it
> on a Gtk::Label after I update the text, and it just returns 1.  I've tried
> removing it, changing the text, and then adding it again. Tried wrapping it
> in various container widgets and using get_width on them. It always comes
> back with 1 after I update the label text.
>
>   Is there anything I'm missing on the usage of get_width?  Some action
> required to re-init the width of the widget before getting it?
>
> Thanks for reading,
> - John
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>



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