I'd start here (however did not try myself):
area(x=[int], y=[int], width=[int], height=[int])
Combination of X, Y, Width and Height used by graphical to store
the bounding box of the graphical. Also used to communicate with
graphical objects and frames about their dimension.
Good luck
Andreas
You can give it a size before opening. After that, it is regulated by the
surrounding frame. If you want to change it from the program, resize the
frame.
--- Jan
(In response to Andreas, I tried things with area, no luck.)
The frame behavior seems to apply only to making it smaller.
If the frame is dragged to make it wider, the picture box
does not follow. Sending the pic a greater width (interactively in
Prolog) makes the picture jump to the upper left. Getting
the picture area and setting the width of that has no effect
on the display.
test :-
new(@sd,dialog('Dialog Test')),
send(@sd,append,button(quit,message(@prolog,doquit))),
send(@sd,append,new(@pic,picture(box))),
send(@pic,width(450)),
send(@pic,height(130)),
send(@sd, open).
Strange thing: if the new picture is given a height equal
to that of the old picture, every time the picture is
adjusted, the height gets smaller by 6 pixels. Adding 6
to the height each time preserves the height.
(@sd is the dialog.)
redrawpic :-
get(@sd,width,W),
W1 is W - 30,
get(@pic,height,H),
H1 is H + 6,
send(@pic,free),
send(@sd,append,new(@pic,picture(box,size(W1,H1)))),
send(@sd,layout).
Merry Christmas!
But you don't want to append pictures to dialog windows. Windows
are designed to be grouped in frames. So, typically you'll see
send(new(P, picture), below, @sd)
--- Jan