This is the code I use for testing.
Code: Select all
set the itemPointer of widget "plList" to 1
set the itemHeight of widget "plList" to 100
Thanks and regards.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
set the itemPointer of widget "plList" to 1
set the itemHeight of widget "plList" to 100
No, unfortunately not, as far as I know. The PolyList and PolyGrid don't have variable item/row height yet. I think there's an enhancement request in for that. You'll have to use the good old datagrid to get variable row height.
There is much that the venerable DataGrid2 does much better than the newcomers - I just wish it was better encapsulated like PoyList and PolyGrid are, and had the clever multi-column facility of PolyList.
Code: Select all
on mouseUp
local tDataLayoutA, tItemContentA
## change top text item "Title" of standard widget "Polylist" as in IDE (9.6.9)
put the dataLayout of widget 1 into tDataLayoutA
put 0 into tDataLayoutA[2]["top"]
put 60 into tDataLayoutA[2]["height"]
put "text-multiline" into tDataLayoutA[2]["content-type"]
set the dataLayout of widget 1 to tDataLayoutA
## change text of first item and set text of "Title"
set the itemPointer of widget"PolyList" to 1
put the itemContent of widget"PolyList" into tItemContentA
put "New content" & cr & "new line is much longer than fits" into tItemContentA["title"] ## with cr
-- put "New content new line is much longer than fits" into tItemContentA["title"] ## auto wrap
set the itemContent of widget"PolyList" to tItemContentA
## increase itemHeight slightly to make room for multiline text
set the itemHeight of widget"PolyList" to 50
end mouseUp
Andreas, do you happen to know of a code example that demonstrates how to get variable row height in the data grid? I've been wanting to add that to my Organize app for eons but just didn't know it was possible.
I seem to remember using a LiveCode lesson on how to make a messenger-type app as a basis, when I needed to make a messenger-type feature once, but I can't find that one now.marksmithhfx wrote: ↑Tue May 02, 2023 12:04 pmAndreas, do you happen to know of a code example that demonstrates how to get variable row height in the data grid? I've been wanting to add that to my Organize app for eons but just didn't know it was possible.
Thanks Andreas for reminding me about this one I posted about it in the message section of the lesson back in 2020 but never got around to trying it... where does the time fly? (However my procrastination may have a benefit as Elanor added a modification in 2021 which she said may make the process clearer. I hope!!)SWEdeAndy wrote: ↑Tue May 02, 2023 12:45 pmBut I found this one that might even better suit your needs:
https://lessons.livecode.com/m/datagrid ... ne-heights
(how-do-i-create-a-form-with-variable-line-heights)