prologswi-prologxpce

Display radio buttons in prolog xpce


I created a menu with Radio Buttons in XPCE prolog, but my radio buttons are showing on the same line, and I want to have each one on a separate line.

My code is the following:

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


Solution

  • Add this line :

    send(Op, layout, orientation:= vertical),