1

我的项目有以下窗口:

在此处输入图像描述

这基本上是配置主框的代码:

add(main_box);
// Add boxes
main_box.pack_start(function_box, Gtk::PACK_SHRINK, 10);
main_box.pack_start(viewport_box);

我想扩大viewport_boxocupe 的宽度大于窗口的一半。我怎样才能做到这一点?

4

1 回答 1

1

You can either change PACK_SHRINK to PACK_EXPAND_WIDGET or use that version of pack_start, which accepts boolean expand and fill parameters

于 2018-08-09T12:16:16.773 回答