Delimiter characters

Delimiter characters

Postby Natter » Tue Apr 28, 2020 8:22 am

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.) ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Delimiter characters

Postby nageswaragunupudi » Wed Apr 29, 2020 11:35 am

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

Re: Delimiter characters

Postby Natter » Fri May 01, 2020 7:41 am

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
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Delimiter characters

Postby nageswaragunupudi » Fri May 01, 2020 7:54 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10651
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Delimiter characters

Postby Natter » Fri May 01, 2020 8:08 am

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)
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests