Is it possible to set the hanging indent of each line in a RTB in c#?
So basically what I need to do in a C sharp rich text box, is take the text from how it looks in this image:
And make it look perfectly formatted like stack overflow does:
- Product Data:
- Submit manufacturers printed product literature, specifications and datasheet in accordance with specifications.
- Test Reports & Certificates:
- Test Reports: Submit one draft of test plan and report for review including:
- Procedures for system and equipment testing.
- Testing checklist.
- Recorded video from each channel of video including metadata which shows record rate, resolution and compression format.
- Certificates: Submit certificates signed by manufacturer cert开发者_JAVA百科ifying that materials comply with specified performance characteristics and physical properties.
- Submit ULC/UL Product Safety Certificates.
- Test Reports: Submit one draft of test plan and report for review including:
I have tried playing with the rtb.sethangingIndent method, but that just sets it for the ENTIRE textbox at the same time
As I am sure you can see, There are different levels that the text needs to be indented by, depending on which level you are at, which I think confuses things a lot!
Is there a way to do this without looping through each line of the textbox, and counting the amount of whitespace before the top line of "block" (that would need to be indented)?
If you manually write this, try to use different paragraphs. 1. Product Data: 1. Submit manufacturers printed product literature, specifications and datasheet in accordance with specifications
If you want to adjust it by code. Try TextPointer. - http://msdn.microsoft.com/en-us/library/system.windows.documents.textpointer.aspx
精彩评论