How to show multi-line text in the Browse LIST

I have a field that has line breaks, I would like to know how to show them in the Browse, today I show them with the breaks, in the tip, but I would like the lines to be self-adjusting

You could replace the line breaks by spaces on the SetQueueRecord, before the ParentCall, with something like this

FIL:Field = RemoveLineBreaks( FIL:Field)

Another approach:
You could use a TEXT control below the Browse to show the field’s content of the selected record…

1 Like

Today I already use this issue with the Control Text, but I wanted to know if there was any solution that would make self-adjusting lines

1 Like

The Clarion LIST control has no support for a multi-line TEXT that simply wraps and takes a variable number of lines like can be done on a REPORT with RESIZE. I think @noyantis can do that with OLE controls.

In Clarion you can configure a multi-line LIST with a fixed number of STRING control lines, e.g. 3 lines, using the Last on Line option and a GROUP. Each row will always have those 3 lines. If the text can be long there is usually also a TEXT control with VSCROLL to show the full text.

Then you have to split your text into 3 lines in SetQueueRecord. That can be done using a hidden Text control reading PROP:Line ,1,2,3 or other logic like finding line breaks with INSTRING(<13,10>. I think Clarion Mag had an Article by Mike Hanson that did text measurement using the Windows API. I’ve found the TEXT control is just fine for a Page of records. Be careful if you are using Browse Totals as that will read the entire file.


Here’s an example I found with 3 lines for Description. Usually 2 or 3 lines in the Browse is enough to let them see to identify the record. You can put a Scroll on that one column with the S(#) modifier as seen in 2 columns of this example highlighted in Green. I would use that if I split the lines using 13,10.

5 Likes

There is the BrowseGrid control template, but it seems too much for this use case…

EasyListView supports multiline texts (actually it wraps long text within cell space):

1 Like

Like this?
Automatic single line or multi line. Word wrapping, triple buffered. Vector icons, non linear cells, pixel perfect fit, with blazing fast search and more…

like this

  • list/row/cell animation
  • 5 view modes (SmallIcon, LargeIcon, List, Tile, Detail)
  • collapsible groups
  • search by typing on any column

and more. And anyone can try right now.

1 Like

Mike, indeed a great product, easy list view looks fantastic.

1 Like

A truly exceptional template, with possibilities unimaginable for creation using the standard clarion browse control… As an example, see the image - grouping with an overlay image of the group, the choice of sort order within the groups, various options for the header and footer of the group, the possibility of selecting records with ctrl, shift (windows standard …), the possibility of highlighting the text we are searching… and much, much more.
And, on top of everything, exceptional support from Mike, and constant improvements to the template… even fulfilling the user’s crazy requests :wink:

2 Likes