【发布时间】:2017-05-23 18:12:05
【问题描述】:
我已经编写了一些代码来在 swi-prolog 中创建一个 GUI,但是我的主窗口对于我的所有按钮和文本字段来说都太小了。例如,如何在第一个结果右侧的“第二列”绘制第 6 个函数结果?
showForm :-
new(W, window('Test', size(800, 800))),
new(D, dialog('Main window', size(800, 800))),
/* 6) serach if country is in Europe */
new(Etiq, text_item('1) Enter country here:')),
send(D, append, Etiq),
new(Result, label),
send(D, append, Result),
send(D, append, button(search, message(@prolog, memberCountry, Etiq, Result))),
/* 7) Path form-to (serach in deep) */
new(Path1, text('6) Path form-to (serach in deep)')),
new(From1, text_item('Enter country FROM here:')),
new(To1, text_item('Enter country TO here:')),
send(D, append, Path1),
send(D, append, From1),
send(D, append, To1),
send(Path1, right, Etiq),
new(Path1Res, label),
send(D, append, button(path, message(@prolog, dfs, From1, To1, [], Path1Res))),
send(D, append, Path1Res),
% .....
send(D, below, W),
send(D, open),
!.
【问题讨论】:
-
您可以使用 XPCE 对话框编辑器。
标签: prolog swi-prolog xpce