[REBOL] Re: resizing windows
From: cyphre:seznam:cz at: 14-Oct-2001 12:21
Hi Garam,
Just played first game of your GOMOKU with Carl Read. I enjoyed it well.
Really cool ;) So here you are two different techniques how to resize
independly more layouts:
----------------first example-----------------------
l1: layout [b1: box red]
l2: layout [b2: box blue]
l1/data: "l1" ;I choose "system" 'data but you can use your own ;)
l2/data: "l2"
f: func [f e][
if e/type = 'resize [
switch e/face/data [
"l1" [b1/size: l1/size - 40x40 show b1]
"l2" [b2/size: l2/size - 40x40 show b2]
]
]
return e
]
insert-event-func :f
view/new/options l1 [resize]
view/new/options/offset l2 [resize] 250x25
wait []
----------------end of first example-------------------------
----------------second example-----------------------------
l1: layout [b1: box red with [feel: make feel [
redraw: func [f a o][
if a = 'show [
f/size: l1/size - 40x40
]
]
]]
]
l2: layout [b2: box blue with [feel: make feel [
redraw: func [f a o][
if a = 'show [
f/size: l2/size - 40x40
]
]
]]
]
f: func [f e][
if e/type = 'resize [
show e/face
]
return e
]
insert-event-func :f
view/new/options l1 [resize]
view/new/options/offset l2 [resize] 250x25
wait []
-------------------------end of second example------------------------------
I hope this will help you to finish resizing in your GOMOKU client ;)
Enjoy it! And keep up the cool work.
regards,
Cyphre