【问题标题】:Gtk: GtkVPaned second child heightGtk: GtkVPaned 第二个孩子的高度
【发布时间】:2011-03-30 10:15:08
【问题描述】:

有什么方法可以让 GtkVPaned 设置分割器位置,这样第二个孩子的高度就为 100px?

谢谢。

【问题讨论】:

    标签: c gtk


    【解决方案1】:

    如果你有一个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 添加到您想要的任何位置,确保布局发生然后询问高度。

    【讨论】:

      猜你喜欢
      • 2020-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-28
      • 2019-12-13
      • 2016-01-15
      • 1970-01-01
      相关资源
      最近更新 更多