Page 1 of 1

Delimiter characters

Posted: Tue Apr 28, 2020 8:22 am
by Natter
Hi,

I create xBrose and specify oBrw:nDataLines=2 the cell contains the text MY TEXT. If I reduce the column width with the mouse, the text in the cell will look like:
MY
TEXT

i.e. the text is redistributed across the column width by the space between words. Is it possible to specify other delimiter characters of the words ("- ", ". ", etc.) ?

Re: Delimiter characters

Posted: Wed Apr 29, 2020 11:35 am
by nageswaragunupudi
XBrowse uses Windows API function DrawTextEx() for drawing single/multi-line text.

If the value does not fit into single line and enough cell height is available, the text is displayed in multiline.

For more details how the DrawTextEx() function works, please see
https://docs.microsoft.com/en-us/window ... rawtextexa

Re: Delimiter characters

Posted: Fri May 01, 2020 7:41 am
by Natter
Thank You, Mr. Rao.

I looked at the DrawTextEx () function, but I still don't understand how you can show a continuous string "ABCDEFGHIJKLMNOPQRSTU" in a cell (which is wider than this cell), so that the string looks something like this

ABCDEFGH
IJKLMNOP
QRSTU

Re: Delimiter characters

Posted: Fri May 01, 2020 7:54 am
by nageswaragunupudi
It does not split a continuous string.
Please try
"ABCDEFGH" + CRLF + "IJKLMNOP" + "QRSTU"

Re: Delimiter characters

Posted: Fri May 01, 2020 8:08 am
by Natter
And how can I figure out how many parts to split a continuous string into ? After all, the width of each substring can be different (depending on the font)