From: "Andy Finkel" > What I am after is a way to programatically make one of the buttons in > the grid appear to be selected. I don't have a mouse for this > application; everything is done via a keypad. > > I was wondering if there were any tricks I could be using to get that > effect. > > (like, is there a way I could iterate through the list of buttons > associated with a particular face, and somehow change that buttons color > ?)
Hi, Andy, You are running into what appears to be a limit in the current implimentation of View/VID. Very fiew of the widgets lend themselves well to the task of taking a focus. A button will merely have a caret cursor line. Even when in focus, the button won't automatically accept keyboard commands. As Gregg mentioned, Brett played with a grid layout that accepted tab keys. The grid was composed of fields. His reb site can be found at: REBOL/View -> Desktop -> Sites -> Code C.-> Grids Perhaps you can gleam some tricks from there. And, yes, there is a way to programmatically iterate through the buttons and change behavior. It may be easier to give the buttons identifiers. The following is one quickie way to create a set-word for each button, placed before the button keyword: ... append mygrid to-set-word rejoin ["bn-" channel grid_count] append mygrid [button] append mygrid size append mygrid copy title .. One could also accummulate this list in a separate block or parse the mygrid block to find the labels. But then the fun begins in managing the behavior, because the default set-up will not readily accept what I *think* you are invisioning. You will likely need to create a new button (or more generally a widget) style to behave correctly. This is do-able, but not straight forward for anyone but the guru's. By the reputation that preceeds you on this list, my guess is you'll reach guru status in another 2 days! ;-) Good luck! --Scott Jones -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
