我在XPCE prolog中创建了一个带有单选按钮的菜单,但是我的单选按钮显示在同一行上,我想让每个按钮在单独的一行上。
我的代码如下: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).
Thanks in advance
添加一行:
send(Op, layout, orientation:= vertical),