[REBOL] Re: newbie q : value & label in text-lists
From: sags:apollo:lv at: 1-Apr-2004 0:11
Thanks for answers!
The next q. is about faces event handling:
I would like to use a layout (form) without help of mouse.
There was some points in couple of documentation files (view
quide and handling events), but no so much.
So I am interested to find some more detailed description or
some examples about tabing (focusing) throught faces (not just
text fields) and more info about "detect" event using.
Could you please point me to a link that I missed.
On 31 Mar 2004 at 21:16, Carl Read wrote:
On 31-Mar-04, [sags--apollo--lv] wrote:
> Hi, List!
> I would like to set up text-list in my layout, so it
> shows just labels, but when selected I could get
> Like in HTML forms:
> <OPTION SELECTED VALUE="ID">Label 1</OPTION>
> I tried some variants by using data blocks, but not
> yet success.
face/lines provides an index to which line in the list has just
clicked on, so that can be used as a pointer to your data.
also a face/user-data which could be used to store your values.
Using this approach, you could have something like this...
my-data: [10 11 12 13 14 15 [this is number 16] 17 18 19]
view layout [
text-list 200x70 data my-labels user-data my-data [
probe pick face/user-data index? face/lines
(The [this is number 16] is just to show you you could have any
you like in my-data.)