help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
wxKevin
Earned a small fee
Earned a small fee
Posts: 21
Joined: Fri Jun 09, 2017 7:45 am

help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

Post by wxKevin »

Haha, I come again, I would like to ask a question, how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger, when it reaches a specified size then the scroll bar appears to the right.

Thank You For Answering.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

Post by doublemax »

I see you're a friend of unusual user interfaces ;)
Have you ever seen an application that does that?

In any case, there is no easy way to do this. You'd have to catch the wxEVT_TEXT event, calculate the size of the current text and then set the size of the text control accordingly.
Use the source, Luke!
wxKevin
Earned a small fee
Earned a small fee
Posts: 21
Joined: Fri Jun 09, 2017 7:45 am

Re: help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

Post by wxKevin »

:D Yes, I used this application, in fact, I was developing a mail client, the recipient edit box on the need for such a function.I may also ask you for more help later :)
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

Post by doublemax »

Honestly, i don't think it's worth the effort. Make a textbox that is reasonably wide enough for most email addresses and that's it.
Use the source, Luke!
wxKevin
Earned a small fee
Earned a small fee
Posts: 21
Joined: Fri Jun 09, 2017 7:45 am

Re: help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

Post by wxKevin »

But my boss asked to do so, and if achieved, it is very convenient. I am here to ask a question, how to put the toolbar above the horizontal line to remove :P
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: help! how to make the edit box(textCtrl, richtextCtrl...) with increasing content becomes larger!!!

Post by doublemax »

I am here to ask a question, how to put the toolbar above the horizontal line to remove
Is that a new question? If yes, please create a new thread for it. And explain it a little bit more, because i have no idea what you mean ;)
Use the source, Luke!
Post Reply