Page 1 of 1

wxTextCtrl "hard" maximum

Posted: Mon Oct 17, 2016 7:10 am
by arnoldemu

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).


Re: wxTextCtrl "hard" maximum

Posted: Mon Oct 17, 2016 4:23 pm
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.