简体   繁体   中英

Gtk - How to set box size?

I have the following window on my project:

在此处输入图片说明

And this is basically the code that configure the main boxes:

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

I would to like to expand the viewport_box to ocupe a width larger than the half of the window. How can I do this?

您可以更改PACK_SHRINK到PACK_EXPAND_WIDGET或使用该版本pack_start ,它接受布尔expandfill参数

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM