view/list: altering layout possible?
[1/2] from: robert::muench::robertmuench::de at: 8-Apr-2002 13:29
Hi, I have the following problem and don't know what's the best way to solve it:
- I use a list that has three columns all of type text.
- There are some actions attached to the text faces.
Now I want to insert some rows into my list that use a different row layout. An
image and a text. The problem is that the list style takes one 'layout block and
this one can either be for the text rows or the image row. What know?
I see the following possibilities (disadvantages marked with -, advantages
marked with +)
1. I use one list style with a container like a box and use the box/pane to
insert a single face I build a priori.
+ simple pattern for list style
- need to simulate the 'supply thing of a list where all columns get triggered
- need to create one layouted face that can be inserted into the pane
- need to handle positioning and sizing myself
2. I use one list for the text rows and create single faces for the image rows.
The image rows are than positioned as a layer over the list (at the position
where a image row is placed, the text list will have an empty line) faking the
one-list imagination.
+ simpler to programm
- syncing list scrolling might be tedious
3. Use the following list layout: image text text text and decided within the
'supply function if an image is needed or not. If not I can hide the face (?) or
set the size to 0x0.
+ consistent with list style
- context depending code within gui code
- tricky to understand
What do you think about the three possibilities? Did I miss some other
possibility? Robert
[2/2] from: brett:codeconscious at: 9-Apr-2002 20:24
Hi Robert,
> Hi, I have the following problem and don't know what's the best way to
solve it:
> - I use a list that has three columns all of type text.
> - There are some actions attached to the text faces.
>
> Now I want to insert some rows into my list that use a different row
layout. An
> image and a text. The problem is that the list style takes one 'layout
block and
> this one can either be for the text rows or the image row. What know?
>
> I see the following possibilities (disadvantages marked with -, advantages
> marked with +)
Another option - no claim to be the best solution...
Option 4. A "calculated pane" - like LIST utilises. Maybe you can even use
the code of the LIST style as a basis for your solution.
+/- Similar to LIST.
+ LIST provides you most of the code (esp. if your images are fixed height)
- You have to think at a lower level than VID (but you are doing that
anyway).
Have a look at "Calculated panes" section of "View Notes" found in "Docs" of
rebsite "Code. C."
(In REBOL/View Click GOTO and enter http://www.codeconscious.com/index.r for
the "Code. C." rebsite.)
Regards,
Brett.