list style
[1/6] from: robert:muench:robertmuench at: 9-Apr-2002 20:32
Hi, I have the following problem: I'm using a list style to display some data.
For the list style you supply a layout block that gets called once the block
containing the list style gets layouted:
mygui: layout [ lst: list 200x200 lstlayout supply lstsupply]
Than for each row in the list that can be displayed lstsupply is called for all
columns.
In my situation I need to execute a block of code once before the list get's
updated and once the list updated ended. The pattern should be like this:
- lstlayout once when calling layout
- lstconstructor once the list drawing starts
- lstsupply gets called (row * columns) times
- lstdestructor once the list drawing ended
Something like this:
mygui: layout [ lst: list 200x200 lstlayout start lstconstructor supply
lstsupply end lstdestructor]
Is this possible? Robert
[2/6] from: anton:lexicon at: 10-Apr-2002 11:41
Have you tried modifying the list's feel/redraw ?
It starts off as none so you should be able to
put your own code in there no problem.
eg. try this:
view layout [
list 300x300 [button] data [["hello"]["there"]] feel [
redraw: func [face act pos][print "redraw"]
]
]
Anton.
[3/6] from: robert:muench:robertmuench at: 10-Apr-2002 9:51
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
<<quoted lines omitted: 3>>
> Subject: [REBOL] Re: list style
> Have you tried modifying the list's feel/redraw ?
Hi, I expect that it has something to do with 'feel but I never used it. Is
there any more information available about the 'feel stuff? Robert
[4/6] from: brett:codeconscious at: 10-Apr-2002 19:10
> Hi, I expect that it has something to do with 'feel but I never used it.
Is
> there any more information available about the 'feel stuff? Robert
See "How to Handle User Interface Events" at
http://www.rebol.com/how-to.html
Brett.
[5/6] from: anton:lexicon at: 10-Apr-2002 20:49
Yes, look here, essential reading:
http://www.rebol.com/how-to/feel.html
Anton.
[6/6] from: robert:muench:robertmuench at: 10-Apr-2002 14:58
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
<<quoted lines omitted: 3>>
> Subject: [REBOL] Re: list style
> http://www.rebol.com/how-to.html
;-) Thanks... I always forget this one. Robert
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted