pre-determining the size of a layout
[1/4] from: gchiu:compkarori at: 1-May-2001 9:32
How does one determine the size of a layout prior to being
passed to 'view ?
--
Graham Chiu
[2/4] from: larry::ecotope::com at: 30-Apr-2001 15:15
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
[3/4] from: gchiu:compkarori at: 1-May-2001 12:08
On Mon, 30 Apr 2001 15:15:27 -0700
"Larry Palmiter" <[larry--ecotope--com]> wrote:
> If you just want the size after letting layout
> automatically generate the
> face,
>
> >> lo: layout [box red]
> >> lo/size
> == 140x140
Thanks Larry.
--
Graham Chiu
[4/4] 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
<<quoted lines omitted: 8>>
> 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]
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted