Polygrid - text wrapping

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bbalmerTotalFluency
Posts: 84
Joined: Mon Apr 06, 2020 1:19 pm
Contact:

Polygrid - text wrapping

Post by bbalmerTotalFluency » Sun Jul 28, 2024 4:29 am

Good morning,

My dictionary is working ok again (thankfully). So I just looked this up, but nothing there.

I have a polygrid column, which I would like to either text-wrap or some other device for handling the fact that most entries are short (book titles) and a few are very long. I don't wish to cut off the long titles but I don't want a massive width field for when most titles are short.

TRIED
I saw there was a "content fit" option in the columns tab of the polygrid property inspector. But I have not found a way to make it do anything.
I changed the column property from text to text-multiline. Did not help

I very much hope there is a solution to this. Any suggestions?

lcwill
Posts: 4
Joined: Sat Jul 06, 2024 11:50 pm

Re: Polygrid - text wrapping

Post by lcwill » Sun Jul 28, 2024 4:13 pm

Hello @bbalmerTotalFluency
for this to work you'll need to set the contentType of the column to text-multiline, and maybe increase the rowHeight of the widget to allow several lines to fit vertically

bbalmerTotalFluency
Posts: 84
Joined: Mon Apr 06, 2020 1:19 pm
Contact:

Re: Polygrid - text wrapping

Post by bbalmerTotalFluency » Mon Jul 29, 2024 9:53 am

Thank you. I have a horrible feeling that I've been THAT dumb.

Set the content to multi-line did NOT change the row height.

I guess I unconsciously assumed it would change the row height for me. When it did not, I went down the line of "feature not working" or "don't know how to make feature work" rather than the altogether more useful - "change the row height"

Thanks for the help, this is VERY useful for my particular situation.

I hope that next week I don't need to ask you how to boil an egg. This one was embarrassing :-(

On the upside - this may help someone else.

paul@researchware.com
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 153
Joined: Wed Aug 26, 2009 7:42 pm
Contact:

Re: Polygrid - text wrapping

Post by paul@researchware.com » Mon Jul 29, 2024 2:19 pm

You may also want to support this requested PolyGrid enhancement: https://quality.livecode.com/show_bug.cgi?id=24394

When using the multi-line contentType, unless the length of the wrapped text is predictable (to you and the app you're making), if the text wraps below the row height, the user can not see it. You could of course add a control to allow the user adjustment of the row height. The enhancement request is for cell scroll, like what you can have with the DataGrid, to allow a user to see any amount of wrapped text in a cell.
Paul Dupuis
Researchware, Inc.

Post Reply