Gtk: GtkVPaned second child height
Is there any way to make GtkVPaned to set splitter position so second child would take 100px height开发者_如何学Python?
Thanks.
If you have a GtkVPaned
and have already added your two widgets to it something like this should work:
GtkVPaned *vpane = ...;
// set up stuff here
int pos = ;// calculate correct position here, easy if you know the height already
g_object_set(vpane,
"position", pos,
"position-set", TRUE);
It gets harder if you don't know the height of the region, then you actually have to add the VPane to whatever you want it in, make sure layout happens then ask for the height.
精彩评论