是否可以在 c# 中的 RTB 中设置每行的悬挂缩进?
因此,基本上我需要在 C Sharp 富文本框中执行的操作是从该图像中的外观中获取文本:
并使其看起来像堆栈溢出一样完美格式化:
- 产品数据:
- 根据规格提交制造商印刷的产品文献、规格和数据表。
- 测试报告及证书:
- 测试报告:提交一份测试计划草案和报告以供审核,包括:
- 系统和设备测试程序。
- 测试清单。
- 每个视频通道录制的视频,包括显示录制速率、分辨率和压缩格式的元数据。
- 证书:提交由制造商签署的证书,证明材料符合指定的性能特征和物理特性。
- 提交 ULC/UL 产品安全证书。
- 测试报告:提交一份测试计划草案和报告以供审核,包括:
我尝试过使用 rtb.sethangingIndent 方法,但这只是同时将其设置为整个文本框
正如我确信您可以看到的,文本需要缩进不同的级别,具体取决于您所在的级别都在,我认为这让事情很混乱!
有没有一种方法可以做到这一点,而无需循环遍历文本框的每一行,并计算“块”顶行之前的空白量(需要缩进)?
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 certifying 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)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您手动编写此内容,请尝试使用不同的段落。
1、产品数据:
1.按照规范提交制造商印刷的产品文献、规格和数据表
如果你想通过代码来调整它。尝试文本指针。 - http://msdn.microsoft.com/en-我们/library/system.windows.documents.textpointer.aspx
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