how do I change the maximum number of characters per line in styledtextctrl or richtextctrl

Hi there. I am making an application that cannot accept the enter keystroke (it all has to be one line) and I noticed that I between 60000 and 70000 is the maximum number of characters that I can fit on one line. Can I increase this somehow? Thanks.

Who Cares wrote:

Hi there. I am making an application that cannot accept the enter keystroke (it all has to be one line) and I noticed that I between 60000 and 70000 is the maximum number of characters that I can fit on one line. Can I increase this somehow?

No. It's probably not a hard limit already, but rather a limit based on the design of the editors. They do a lot of work in a per-line or per-paragraph basis and the work being done is probably going up exponentially based on the size of the line or paragraph so when they get huge you run into the limitations of that the computer can do.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

So the issue is with the edit controls? I noticed on Linux I can get it to between 200,000 and 300,000. So the edit controls can behave differently depending on the operating system?

···

On Sat, May 9, 2009 at 4:37 PM, Robin Dunn robin@alldunn.com wrote:

Who Cares wrote:

Hi there. I am making an application that cannot accept the enter keystroke (it all has to be one line) and I noticed that I between 60000 and 70000 is the maximum number of characters that I can fit on one line. Can I increase this somehow?

No. It’s probably not a hard limit already, but rather a limit based on the design of the editors. They do a lot of work in a per-line or per-paragraph basis and the work being done is probably going up exponentially based on the size of the line or paragraph so when they get huge you run into the limitations of that the computer can do.

Robin Dunn

Software Craftsman

http://wxPython.org Java give you jitters? Relax with wxPython!


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Nater wrote:

So the issue is with the edit controls? I noticed on Linux I can get it to between 200,000 and 300,000. So the edit controls can behave differently depending on the operating system?

They're both generic widgets (IOW, not native) but they are implemented using platform specific APIs at a lower level, so yes, there could be platform specific limitations involved. Such as how large of a string you can measure the distance in pixels from the beginning of the string to each character in the string. That is the operation that is likely causing O(n^2) time to execute where n is the number of characters on a line. So huge lines means at least huge-squared time overhead per line to render, so it gets to the point where that overhead either makes the widget appear that it is not working, or the platform may simply generate an error when it is asked to do certain things it doesn't want to do.

···

--
Robin Dunn
Software Craftsman