VL-Web - how to show notes with basic (line) formating
Posted: Thu Feb 09, 2017 3:32 am
The requirement is to show list of notes on single web page. Each note have a single caption and some text, basically formated only by paragraphs (defined point for new line).
I have created reusable part as the caption + text container and made collection from them, filled from list. It works fine, except two rules, which should both be true:
1) The each message takes only required content space, which is responsible changing by display size
2) The basic formating - a new lines in defined place in text.
I tried to use two different classes for text displaying - Caption (#PRIM_LABL) and Multiline Edit box (#PRIM_TEXT).
For each I have layout items with settings Sizing(ContentHeightFitToWidth)
Problem:
If Caption type is used, the sizing and responsibility works perfectly, but all text is formated as a single paragraph. I am not able to find any way, how to force wrap the caption text in particular point. It correctly wraps only at end of line space.
If MultilineEditBox is used, the text is correctly wrapped if it contain CR character (13).AsChar , but the hight is fixed - the rule ContentHight probably does not work for this type of component
.
Attached are exaple with those two classes type displaying the same text. Above is Caption (correctly sized, but without text wrap), below is MultilineEdit (with correctly wrapped text but taking unnecessary space).
Have anyone idea how to either:
- force a new line in Caption component,
or
- force the Multiline Edit Box to set High property based on content
or
use another componenty type ?
I have created reusable part as the caption + text container and made collection from them, filled from list. It works fine, except two rules, which should both be true:
1) The each message takes only required content space, which is responsible changing by display size
2) The basic formating - a new lines in defined place in text.
I tried to use two different classes for text displaying - Caption (#PRIM_LABL) and Multiline Edit box (#PRIM_TEXT).
For each I have layout items with settings Sizing(ContentHeightFitToWidth)
Problem:
If Caption type is used, the sizing and responsibility works perfectly, but all text is formated as a single paragraph. I am not able to find any way, how to force wrap the caption text in particular point. It correctly wraps only at end of line space.
If MultilineEditBox is used, the text is correctly wrapped if it contain CR character (13).AsChar , but the hight is fixed - the rule ContentHight probably does not work for this type of component
Attached are exaple with those two classes type displaying the same text. Above is Caption (correctly sized, but without text wrap), below is MultilineEdit (with correctly wrapped text but taking unnecessary space).
Have anyone idea how to either:
- force a new line in Caption component,
or
- force the Multiline Edit Box to set High property based on content
or
use another componenty type ?