2
我在XPCE prolog中創建了一個帶有單選按鈕的菜單,但我的單選按鈕顯示在同一行上,並且我希望將每個按鈕放在單獨的行中。在序言中顯示單選按鈕xpce
我的代碼如下:提前
new(D, dialog('title')),
send(D, size, size(500,500)),
send(D, append,new(Op, menu(options, marked))),
send(Op, append, option1), send(Op,append, option2),
send(Op, append, option2),
send(Op, size,size(300,300)),
send(D, display, Op, point(100, 40)),
send(D,append(new(B1,button(ok, message(D, return, Op?selection))))),
send(D,display, B1, point(100, 100)),
send(D, append(button(cancel,message(D, return, @nil)))),
send(D, default_button(ok)), get(D,confirm, Rval),
free(D).
感謝