有什么方法可以让 GtkVPaned 设置分割器位置,以便第二个 child 的高度为 100px 吗?
谢谢。
最佳答案
如果您有一个 GtkVPaned
并且已经向其中添加了两个小部件,如下所示应该可以工作:
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);
如果您不知道区域的高度,事情会变得更加困难,那么您实际上必须将 VPane 添加到您想要的任何位置,确保布局发生然后询问高度。
关于c - Gtk:GtkVPaned 二胎高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5484962/