% Author:
% Date: 02/04/2015
:- use_module(library(pce)).
dialog('screen1',
[ object :=
Screen_,
parts :=
[ Screen_ := dialog('Screen1'),
Button1 := button(button),
Button2 := button(button)
],
modifications :=
[ Button2 := [ label := 'OpenScreen2'],
Button1 := [ label := 'Quit'],
],
layout :=
[ area(Button2,area(124, 19, 89, 24)),
area(Button1,area(127, 80, 80, 24))
]
]).
dialog('screen2',
[ object :=
Screen_,
parts :=
[ Screen_ := dialog('Screen2'),
Button1 := button(button),
Button2 := button(button)
],
modifications :=
[ Button2 := [ label := 'RunCode'],
Button1 := [ label := 'Back']
],
layout :=
[ area(Button2,area(146, 34, 80, 24)),
area(Button1,area(148, 96, 80, 24))
]
]).
s_d :- make_dialog(M,screen1),
%send(M, append, button(quit, message(M, destroy))),
send(M, open).
I am having trouble with Message for the buttons,
- I know message for button quit is destroy, but not able to set syntax correctly.
- button2, needs to open dialog screen2, so I need help with the message for button 2 as well.