Mike,
Regarding the [data (false)] case you mentioned. I decided to write a bit
more about this "hidden feature".
I forgot to mention that the DATA block of the my-list style is using some
kind of data-dialect.
If you specify cell content without brackets [] it will handle it as a text
content for given cell element(VID style you are using in the columns
block). Example:
..........
data [[1 "hello" word]]
.........
In this case the list engine fill all three cels in a row with texts "1"
"hello" "world".
That is enough for suplying cells of style TEXT, FIELD, BUTTON etc. But when
you need to specify other data for given cell you need to use [] brackets
which means for the engine "turn the dialect on" and supply all the stuf in
the block to the style of the cell. Example:
............
data [[[data #[false]] [effect [gradient 1x1 red green]][image logo.gif]]]
...........
In this case the list engine sets appropriate properties in specific cells.
This way you are able to do lot of things, not only the text lists etc.
basically you have a grid engine which can be easily programmed.
You can also acces those data dialect blocks at runtime and modify them
using face/user-data reference. for example:
......
data [[[data #[false]]]]
columns [
check 24x24 [face/user-data/2: face/data]
]
.....
In this case when user clicks on the checkbox the code in action block of
the cell will dynamically rewrite the logical value in data dialect block so
the new checkbox state is remembered when the list is refreshed.
The idea of list(or grid) data dialecting is still in alpha stage(and I have
still lot ideas to improve it) so feel free to made any comments.
regards,
Cyphre
----- Original Message -----
From: "Mike Yaunish" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 7:20 PM
Subject: [REBOL] Re: Menu in REBOL-View
> Hi Cyphre, thanks for your example. I was a little hung up on inserting
> [data (false) ] into the
> list but have straightened out my thinking. I am now experimenting with
> trying to change the
> number and types of columns in the list after I have already displayed a
> list. A kind of redefinition
> of the list itself after it has already been used. Any good ideas on how I
> might go about that?
>
> Mike
>
>
> >Hi Mike,
> >
> >I'm not sure if this is what you need(watch out line breaks!):
> >
> >-------------------------<code begin>-----------------------------------
> >REBOL [
> > title: "text list style - example with checkboxes"
> > author: [EMAIL PROTECTED]
> >]
> >
> >do %../styles/my-list.r ; load the my-list style
> >
> >demo-data: copy []
> >
> >repeat n 50 [
> > num: form n
> > while [(length? num) < 2][insert num "0"]
> > insert/only tail demo-data compose/deep [
> > [data (false)] ;<-store the current state of checkbox here(can be
changed
> >by user at runtime)
> > (join "line " num);some test text
> > ]
> >]
> >
> >view layout [
> > origin 0
> > lst: my-list -1x218;autosize width
> > columns [ ;'layout' of the columns
> > check 24x24 [face/user-data/2: face/data];updates state of cell with
> >checkbox
> > txt 200x24 center
> > ]
> > data demo-data ;data for the list
> > rowbar ["X" "text"] ;rowbar labels for each column
> > line-colors reduce [ivory snow]; color pattern for lines in list
> >]
> >
> >-------------------------<code end>-----------------------------------
> >
> >regards,
> >
> >Cyphre
> >
> >
> >----- Original Message -----
> >From: "Mike Yaunish" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, October 26, 2004 12:32 AM
> >Subject: [REBOL] Re: Menu in REBOL-View
> >
> >
> > > Hi guys, I have been playing with the list package and think it's just
> >what
> > > I've been looking for.
> > > Can't seem to get lines added to a list that contain check boxes with
any
> > > success.
> > > Can you give me a hint?
> > >
> > > Mike Yaunish
> > >
> > >
> > > >Hi Lethalman and all,
> > > >
> > > >you can grab my latest styles package(still in alpha stage) at:
> > > >
> > > >http://www.rebol.cz/~cyphre/cgi-bin/styles-pack.cgi
> > > >
> > > >regards,
> > > >
> > > >Cyphre
> > > >
> > > >----- Original Message -----
> > > >From: "Gabriele Santilli" <[EMAIL PROTECTED]>
> > > >To: "Lethalman" <[EMAIL PROTECTED]>
> > > >Sent: Sunday, October 17, 2004 12:54 PM
> > > >Subject: [REBOL] Re: Menu in REBOL-View
> > > >
> > > >
> > > > >
> > > > > Hi Lethalman,
> > > > >
> > > > > On Sunday, October 17, 2004, 12:28:17 PM, you wrote:
> > > > >
> > > > > L> So, aren't there menus in rebol?
> > > > >
> > > > > Cyphre has a menu style with WinXP look that works really well.
> > > > > The script is called ctx-menu.r, not sure if it's in the library
> > > > > or not, maybe Cyphre can give you a URL.
> > > > >
> > > > > Regards,
> > > > > Gabriele.
> > > > > --
> > > > > Gabriele Santilli <[EMAIL PROTECTED]> -- REBOL Programmer
> > > > > Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/
> > > > >
> > > > > --
> > > > > To unsubscribe from the list, just send an email to rebol-request
> > > > > at rebol.com with unsubscribe as the subject.
> > > > >
> > > > >
> > > >
> > > >--
> > > >To unsubscribe from the list, just send an email to rebol-request
> > > >at rebol.com with unsubscribe as the subject.
> > >
> > >
> > > --
> > > To unsubscribe from the list, just send an email to rebol-request
> > > at rebol.com with unsubscribe as the subject.
> > >
> >
> >--
> >To unsubscribe from the list, just send an email to rebol-request
> >at rebol.com with unsubscribe as the subject.
>
>
> --
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
>
--
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.