[REBOL] Re: Question on text formatting
From: greggirwin:mindspring at: 28-Aug-2002 20:19
Hi Andy,
<< (please remember I only started playing with Rebol a couple of weeks ago,
so I keep trying to do things the C way, and when that fails, I make it
simple/inelegant.... >>
At two weeks...you're way ahead of where I was. :)
<< I can't quite manage the same spacing on the leftmost scrolling box
(lineup_box) as on the buttons. While I could make the lineup_box a
scrolling list of buttons, it seems like too much overhead. >>
Change the spacing to 1x1 in your LINEUP block, so it matches the spacing in
the grid block. I added a text style to make sure the size matches that of
the buttons you set as well.
; build channel lineup
lineup: [
backcolor back_color
origin 0x0 space 1x1 ;0x0
pad 0
style text text 80x20
]
<< (this is where I want to be able to get the maximum size of the larger
page that I am scrolling; so I can stop when I've scrolled through all
the entries; >>
Looks like grid-f/size/y is what you're after.
<< and if anyone knows of an easy way to force one of the
buttons on the scrolling grid to be "selected" my day would be complete
:-) >>
FOCUS is what you use to select a specific face. I'm not sure it will do
what you want here though. Buttons don't respond to many keystroke by
default (you can, of course, add that behavior). I think Brett Handley did a
grid style that let you move from face to face with the keyboard. Maybe it
was Cyphre. So many talented people write great stuff that I lose track. :)
view layout [a: button [print "A"] b: button [focus a]]
HTH!
--Gregg