Delimiter characters

Post Reply
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Delimiter characters

Post 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.) ?
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Delimiter characters

Post 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
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Re: Delimiter characters

Post 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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Delimiter characters

Post by nageswaragunupudi »

It does not split a continuous string.
Please try
"ABCDEFGH" + CRLF + "IJKLMNOP" + "QRSTU"
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Re: Delimiter characters

Post 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)
Post Reply