FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Delimiter characters
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Delimiter characters
Posted: Tue Apr 28, 2020 08: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.) ?
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Delimiter characters
Posted: 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
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Delimiter characters
Posted: Fri May 01, 2020 07: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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Delimiter characters
Posted: Fri May 01, 2020 07:54 AM

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

Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Delimiter characters
Posted: Fri May 01, 2020 08: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)

Continue the discussion