开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜