Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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;
Posted
Updated 14-Dec-11 19:01pm
v4
Comments
Sergey Alexandrovich Kryukov 14-Dec-11 23:38pm    
Huh? :-)
--SA
Chandrasekharan P 14-Dec-11 23:43pm    
Oh that was the reaction that i had...
"High Degree of Automatic growth Richedit".. what the heck is that???
Chuck O'Toole 14-Dec-11 23:56pm    
Sounds like something from a Mutual Fund Prospectus
Resmi Anna 15-Dec-11 0:41am    
Can you be clear?What you really need?you want to have an rich edit control without any scroll bar. but it should contain any amount of data. as the data increases, instead of showing the scroll bar, your rcih edit control's size it self should increase?
zwc_1122 15-Dec-11 0:55am    
I want to realize rcih edit control's size it self should increase;

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.
 
Share this answer
 
HI, 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
 
Share this answer
 
v3
Comments
Mohibur Rashid 15-Dec-11 1:49am    
I could have improve his question, But Decide not to
zwc_1122 15-Dec-11 2:04am    
thanks Johny,
English was not my native language too;
I thinks you have expressed what I mean.
I just want to realize richedit control's size itself could increase automatically, no scroll bar; Of course, the data is certainly not infinite, but in a fixed area to increase the size of RichEdit.
This matter is urgent need to address.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900