[REBOL] Re: pre-determining the size of a layout
From: carl:cybercraft at: 2-May-2001 1:13
On 01-May-01, Larry Palmiter wrote:
> Hi Graham
> If you just want the size after letting layout automatically
> generate the face,
>>> lo: layout [box red]
>>> lo/size
> == 140x140
> This is the size of the REBOL window only and does not account for
> the titlebar and outer edges produced by the operating system.
> On Win98, the total size for this example is 146x165, so the edges
> are 3 pix wide, and the title bar takes another 19 pixels including
> the edge at it's bottom.
> -Larry
Hmmm. Just been playing with layouts and could've used /size. But
having experimented with it, I'm getting problems. By my reckoning,
the following should produce two identical windows...
REBOL []
lo: [
origin 1x1
text "Click on me." [view/new p-lo]
]
lo-data: layout lo
p-lo: layout [
origin 1x1
panel lo lo-data/size
]
view center-face layout lo
But when I click on the first one, the second one, (the p-low layout)
doesn't show all the text. So, is this a bug, or should I just wait
for the View manual?
Oh, and the text in the following starts out high-lighted and stays
high-lighted regardless of whether the mouse is over it. Changing
origin to 1x1 fixes this though.
view layout [origin 0x0 text "Some active text." []]
--
Carl Read
[carl--cybercraft--co--nz]