在RichTextBox中设置文本的开始位置 [英] setting the start position of text in RichTextBox

查看:190
本文介绍了在RichTextBox中设置文本的开始位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我的项目中有一个RichTextBox,可作为TextEditor项目的文档表.现在,我在运行项目时遇到的问题是文档"表中的键入文本不是从左上角开始,而是在字符出现之前留有较大的缩进空间.即使当我继续输入字符时,它也会环绕在文档表的右端,并在开始下一行之前留出相同的缩进空间.我尝试设置RichTextBox的margins属性,但是它不起作用.感谢您提供有关此问题的任何帮助,谢谢.

Hi friends, I have a RichTextBox in my project which serves as Document sheet for my TextEditor Project. Now, the problem i have when running my project is that the typed text in the Document sheet does not start at the extreme top-left corner but leaves a big indented space to precede before the characters appear. Even when i continue typing in characters, it wraps around at the right end of the Document sheet and leaves the same indented space before beginning the next line. I have tried setting the margins property of the RichTextBox but it does not work. Please any kind of help on this problem will be greatly appreciated, thank you.

推荐答案

我认为这只是一些错误.请帮个忙:创建一个全新的应用程序,然后做最少的事情:向其中添加RichTextBoxControl并运行.您不会看到此问题.比较控件的属性.您所做的更改将以粗体显示.缩小搜索范围.如果您仍未找到原因,请在代码中显示相关的小部分.

—SA
I think this is just some bug. Please do yourself a favor: create a brand new application and do the minimum: add RichTextBoxControl to it and run. You won''t see this problem. Compare properties of the control. What you have changed will be shown in bold. Narrow down your search. Show small relevant part your code if you still did not spot the reason.

—SA


这篇关于在RichTextBox中设置文本的开始位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆