I am creating a comma separated list of names in a string like
Mr John Blue, Miss A Green, Mr Posh Hyphenated-Surname, Mr Fred Green, Miss Helen Red, Ms Jean Yellow
Now I want to display them in the memo field, which will contain 50 characters in each line, so that as many names as possible (and their final comma) are displayed on each line. so the above should look like
Mr John Blue, Miss A Green,
Mr Posh Hyphenated-Surname, Mr Fred Green,
Miss Helen Red, Ms Jean Yellow
I played with
Memo1.text := WrapText(Mystring,50)
but he broke the lines between the first and last names, and I tried
Memo1.text := WrapText(MyString, slinebreak, ',' ,50)
to make it break only after the comma, but it broke both in spaces and in commas. Both tend to hyphenate, and I notice from Rob Kennedy an answer to a similar question that inline quotes cause problems with Wrap (), so a name like Mr John O'Donald will cause problems.
, , IFs ( , !)
- - , , ?
PS
- 'Word wrap TMemo (+) char'
- ' "" ?
- ' ,
, , .