我试图创建的 gui 遵循这个简单的逻辑:
- IupDialog:
- IupVbox
- IupSplit
- 列表
- 列表
- IupSplit
- IupVbox
列表应该填充拆分,并在需要时具有滚动条。这是可行的,但是,如果我稍微调整窗口大小,IupVbox就会变得太大以至于不适合对话框,并且您看不到它的边距或列表的滚动条。我可能做错了什么,但我无法弄清楚。
这是我正在做的简化版本:
Ihandle *page, *box_options, *split, *btn_work, *dlg;
{
list_entries = IupList(NULL);
IupSetAttribute(list_entries, "EXPAND", "YES");
}
{
list_log = IupList (NULL);
IupSetAttribute(list_log, "EXPAND", "YES");
}
split = IupSplit(list_entries, list_log);
IupSetAttribute(split, "ORIENTATION", "VERTICAL");
page = IupVbox(split, NULL);
IupSetAttribute(page, "GAP", "20");
dlg = IupDialog(page);
IupShowXY (dlg, IUP_CENTER, IUP_CENTER);