Using LIST-VIEW as an editor
29-Jan-2006 02:29 Filed in: LIST-VIEW
LIST-VIEW has been growing fast these past three
weeks, but there is way more to come to make it
really cool. You see, it's nice to use as an
element in your own GUI, but it also has the ability
to function as a stand alone data editor similar to
the already built in text editor. Right now you can
do this:
And you can now graphically edit BLOCK using three columns, A, B and C.
With a few more modifications, you can add and delete columns in the list dynamically. This isn't possible directly in DATA yet, as it will only add columns to a single row, but I plan to add functions to let you do this to all rows in DATA. This will make it a fully fledged block editor with a few lines of code.
block: copy []
view layout [
li: list-view with [
data-columns: [a b c]
data: block
editable?: true
]
btn "Add Row" [li/append-row]
]
And you can now graphically edit BLOCK using three columns, A, B and C.
With a few more modifications, you can add and delete columns in the list dynamically. This isn't possible directly in DATA yet, as it will only add columns to a single row, but I plan to add functions to let you do this to all rows in DATA. This will make it a fully fledged block editor with a few lines of code.
|