开发者

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:

Is it possible to set the hanging indent of each line in a RTB in c#?

And make it look perfectly formatted like stack overflow does:

  1. Product Data:
    1. Submit manufacturers printed product literature, specifications and datasheet in accordance with specifications.
  2. Test Reports & Certificates:
    1. Test Reports: Submit one draft of test plan and report for review including:
      1. Procedures for system and equipment testing.
      2. Testing checklist.
      3. Recorded video from each channel of video including metadata which shows record rate, resolution and compression format.
    2. Certificates: Submit certificates signed by manufacturer cert开发者_JAVA百科ifying that materials comply with specified performance characteristics and physical properties.
      1. Submit ULC/UL Product Safety Certificates.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜