PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
rtf problem - nonbreaking hyphen breaks plus other problems
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
rtf problem - nonbreaking hyphen breaks plus other problems
![]() |
rtf problem - nonbreaking hyphen breaks plus other problems |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 scroll bar is removed and the series of phone numbers split on one the hyphens and the space after the comma ends up at the beginning of the line screwing up the format. Only the scroll bar When the form is restored to it's original size the scroll bar is missing until you set the cursor in the rtf box and move the cursor down. -- tsiGeorge |
|
|
|
#2 |
|
Guest
Posts: n/a
|
A bit confusing to read: try using paragraphs next time so the problem is easier to grasp. Ok, we have an example of the input numbers. Pls give a clean example of the intended output. I am not sure the issue with the scroll bar, but lets deal with the formatting first... /Pete. "tsiGeorge" <molly@community.nospam> wrote in message news:B814729D-4F9B-4079-BD4A-CA94866EA410@microsoft.com... | 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 scroll bar is removed and the | series of phone numbers split on one the hyphens and the space after the | comma ends up at the beginning of the line screwing up the format. Only the | scroll bar When the form is restored to it's original size the scroll bar is | missing until you set the cursor in the rtf box and move the cursor down. | -- | tsiGeorge |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

