Re: Gtk::Widget::size_request



Hello Dale,


I can not say why size_request() function is a member class. But maybe this message will help  you.

However, let me begin with a little reminder of the documentation:

"Also remember that the size request is not necessarily the size a widget will actually be allocated."

This is because the widget uses this function to calculate the minimum size to be allocated.
So it is not size_request which directly determine the size of the widget but the get_preferred_*()'s function.

You need to override the get_preferred* function.
I find this tutorial very well : https://developer.gnome.org/gtkmm-tutorial/3.4/sec-custom-containers.html.en



Regards,



2013/5/26 Dale <dale rdmp org>
Why is this method not virtual?  If I want to create a custom widget with dynamic size, how should I tell the parent what size to try to allocate?
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



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