G
Guest
I'm using a read only rich text box to format some text. In the text is a
series of phone numbers separated by a comma and a space. I don't want the
phone numbers to be split.
Here's what I've done. I replace '-' with '\_'which is supposed to be the
non-breaking hyphen. If I look at the string before it is stored in the
rtf it looks like ';555\_201\_1234, 555\_201\_1111, '. In the rtf it looks
like '555-201-1234, 555-201-1111, '.
When the form is displayed at the normal size, the series of phone numbers
are displayed correctly except that the space after the comma is at the
beginning of the next line.
When the form is made larger the vertical scroll bar is removed (the rtf
box fits on the screen) and the series of phone numbers split on one of the
hyphens screwing up the format. If there enough phone numbers to keep the
vertical scroll bar, the data is displayed correctly, except that the lines
start with a space.
When the form is restored to it's original size, the vertical scroll bar is
missing if it wasn't required on the larger window. If you set the cursor in
the rtf box and move the cursor down the vertical scroll bar appears.
I see 3 problems:
1. The rtf control string for a nonbreaking hyphen doesn't work.
2. If a line is split on a space the space should be at the end of the line.
3. Vertical scroll bar is missing when required.
series of phone numbers separated by a comma and a space. I don't want the
phone numbers to be split.
Here's what I've done. I replace '-' with '\_'which is supposed to be the
non-breaking hyphen. If I look at the string before it is stored in the
rtf it looks like ';555\_201\_1234, 555\_201\_1111, '. In the rtf it looks
like '555-201-1234, 555-201-1111, '.
When the form is displayed at the normal size, the series of phone numbers
are displayed correctly except that the space after the comma is at the
beginning of the next line.
When the form is made larger the vertical scroll bar is removed (the rtf
box fits on the screen) and the series of phone numbers split on one of the
hyphens screwing up the format. If there enough phone numbers to keep the
vertical scroll bar, the data is displayed correctly, except that the lines
start with a space.
When the form is restored to it's original size, the vertical scroll bar is
missing if it wasn't required on the larger window. If you set the cursor in
the rtf box and move the cursor down the vertical scroll bar appears.
I see 3 problems:
1. The rtf control string for a nonbreaking hyphen doesn't work.
2. If a line is split on a space the space should be at the end of the line.
3. Vertical scroll bar is missing when required.