谁来实现自动增长RichEdit [英] who to realize automatic growth RichEdit

查看:63
本文介绍了谁来实现自动增长RichEdit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要实现自动增长RichEdit,没有滚动条;
如何使用C ++实现这一目标;

我想知道richedit控件本身的大小可以自动增加,没有滚动条;

谁能告诉我如何使用C ++ MFC Achieve;

I need realize automatic growth RichEdit, no scroll bar;
how to achieve this using C++;

I want realize richedit control''s size itself could increase automatically, no scroll bar;

Who can tell me how to using C++ MFC Achieve;

推荐答案

详细信息取决于您使用的开发平台.

简单的概念是对RichEdit控件可以发送的某些事件做出反应(通常,每次用户按下一个键),然后让默认操作发生后,监视已编辑文本的状态(它持续多长时间,多少?它包含的行等),然后尝试猜测是否有一个最佳大小"来容纳它,并因此相应地调整Richedit控件窗口的大小(richedit控件也是一个窗口,因此可以像其他任何窗口一样移动和调整大小)窗户).

找到最佳尺寸是困难的部分,因为最佳"的概念可能是主观的.您必须决定是使编辑器变宽还是变高,最终改变线条的组成方式.解决这个问题的算法可以是琐碎的或非常复杂的,但必须是快速的,因为它与用户键入操作一致地运行.

可以通过在"Ricedit控件API"上搜索并最终使用您正在使用的开发平台的名称来找到详细信息.
The detail depends on the platform you develop with.

The simple concept is to react to some event the RichEdit control can send (typically, every time the user presses a key) and, after letting the default action to happen, monitor the state of the edited text (how long is it, how many lines it contains etc.), then try to guess if there is a "optimum size" to accommodate it, and consequently resize the Richedit control window accordingly (the richedit control is also a window, so it can be moved and resized like any other window).

Finding the optimum size is the difficult part, since the concept of "optimum" may be subjective. You have to decide if make the editor wider or higher, eventually changing the way lines are composed. The algoritm to di this can be anything trivial or very complex, but must be fast, since it has run in-line with the user typing actions.

The details can be found by googling "Ricedit control API" eventually followed by the name of the development platform you''re using.


我是Johny,
我正在努力阐述他的问题.如果不能正确执行,请原谅我.

通常,当用户继续书写并且文本增长的时间超过窗口可以容纳的时间时.当文本超过窗口空间时RichEdit控件显示滚动条.但是,有什么办法可以使Richcontrol的滚动条不可见,也不意味着RichEdit Control不会允许写更多它可以容纳的内容.

另一件事:可能OP也希望随着行数的增加来增加RichContol的高度.因此,他想知道是否有任何消息表明Richcontrol的Display Space用完了吗?

英语也不是我的母语.我也很难用英语写东西
I am Johny,
I am trying to elaborate his question. Please forgive me if I cannot do it properly.

In General when user continue writing and text grows longer than the window can hold. When the text is more than the window space RichEdit Control Display the Scroll bar. But Is there any way Where scroll bar of Richcontrol wont be visible and also It does not mean that RichEdit Control wont allow write more that it can hold.

Another thing: Probably OP also want to increase the height of RichContol with the increase of line. For this reason he want to know is there any message that says Richcontrol is running out Display Space?

English is not my native language either. I also have hard time to write something in English


这篇关于谁来实现自动增长RichEdit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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