wxTextCtrl "hard" maximum

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
arnoldemu
In need of some credit
In need of some credit
Posts: 7
Joined: Mon Dec 29, 2014 12:59 pm

wxTextCtrl "hard" maximum

Post by arnoldemu »

Hi,

I can set a max text length on a wxTextCtrl with SetMaxLength. I see this as setting a "soft" maximum limit - i.e. the limit defined by the wxTextCtrl itself and which I can control directly.

Some OSes have a maximum supported "hard" limit for a wxTextCtrl. e.g. in the documentation it says:

"Use rich text control under MSW, this allows to have more than 64KB of text in the control. This style is ignored under other platforms. "

Is there a way to query the "hard" limit for each OS?

(I have a dialog where a user can drag and drop a text file into a wxTextCtrl and I want to tell them if they have dragged in a file that is too large to show in a wxTextCtrl).

Thanks.
Manolo
Can't get richer than this
Can't get richer than this
Posts: 828
Joined: Mon Apr 30, 2012 11:07 pm

Re: wxTextCtrl "hard" maximum

Post by Manolo »

Some limits I know of:
MSWin XP: 32K
MSWin with "Rich text" style: No limit for multiline control
GTK2/3 : 64K

For larger amounts of text perhaps you need to implement your own [scrolled] window.
Post Reply