Entity: predicate

button( )
button(Arg1, ... , ArgN)

Creates a button control.

Put inside the brackets only these arguments which you need. All other arguments will be set by default. The arguments may be any of the following (the order is not important).
handle(Handle) handle to this button. 
parent(Parent) handle to the parent window.
class(But_func) predicate which will receive the messages from this button.
text(Text) the text which is on the button
pos(X,Y) coordinates of upper left corner
size(Width, Height)  size of the button
grayed  flag (default off)


?-window( title("Button demo"), size(200, 200) ).

  button( class(bfunc), text("button"), pos(20,20), size(80,50) ).

bfunc(press):-message("Message", "Button pressed.", i).

See also: