Suppir Posted November 25, 2009 Share Posted November 25, 2009 If we use standart $Edit1 = GUICtrlCreateEdit("", 0, 0, 400, 300) we have limitation to 32 kb of data to be stored in Edit. But we can use: GUICtrlSetLimit($Edit1, 99999999) to extend this limitation to 99999999 byte. How to extend the limitation of _GUICtrlRichEdit_Create? I really want to store more than 32 kb of text in Edit Link to comment Share on other sites More sharing options...
enaiman Posted November 25, 2009 Share Posted November 25, 2009 (edited) That's strange, an year ago I remember I had problems with an Edit control; I wanted to use it as a console window for a Telnet-like application but after a certain point it simply stopped to accept any more text. It was a limitation at the time so I gave up and used an embedded IE with _IEDocInsertText to overcome the text limit. However, today I had a surprise when trying the Edit text limit - it looks like it was able to display a whole 24Mb text file. I wonder - is 3.3.0 responsible for that text limit change? I guess I'll have to go back to old projects and change the embedded IE with Edit To answer OP about Edit limit - it doesn't appear to have any 32kB limit with default settings, in my example, it is able to display a 24 mB string: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 644, 447, 192, 124) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $Edit1 = GUICtrlCreateEdit("", 24, 16, 593, 377) GUICtrlSetData(-1, "Edit1") GUICtrlSetOnEvent(-1, "Edit1Change") $Button1 = GUICtrlCreateButton("Button1", 256, 408, 75, 25) GUICtrlSetOnEvent(-1, "Button1Click") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Button1Click() Local $tt For $i = 1 To 200000 $tt &= "qqqqwwwwwwwwwwwwwwwwqqqqqqqqqqqqqqqqqqwwwwwwwwwwwssssssssssssssss "&$i&@CRLF Next FileWrite(@TempDir&"\ttt.txt", $tt) GUICtrlSetData($Edit1, $tt) EndFunc Func Edit1Change() EndFunc Func Form1Close() Exit EndFunc Tested it further: it went very well up to 3000000 lines (481 MB); when tested for 4000000 it gave a memory allocation error Edited November 25, 2009 by enaiman SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Suppir Posted November 26, 2009 Author Share Posted November 26, 2009 Yes, I wrote that CtrlEdit have no 32 kb. limitation. Actually it does, but if we using code GUICtrlSetLimit($Edit1, 99999999) we can enlarge this limit to 99999999 bytes. But I'm talking about the limit in _GUICtrlRichEdit_Create control (which is in popular UDF RichEdit). It has a limit of 32 kb, and I really do not know how to pass this limit in RichEdit Link to comment Share on other sites More sharing options...
martin Posted November 26, 2009 Share Posted November 26, 2009 Yes, I wrote that CtrlEdit have no 32 kb. limitation. Actually it does, but if we using code GUICtrlSetLimit($Edit1, 99999999) we can enlarge this limit to 99999999 bytes. But I'm talking about the limit in _GUICtrlRichEdit_Create control (which is in popular UDF RichEdit). It has a limit of 32 kb, and I really do not know how to pass this limit in RichEdit Send a message to the rich edit control. Const[i] $EM_EXLIMITTEXT =[/i] $WM_USER+53 _SendMessage($hRE,$EM_EXLIMITTEXT,0,$NewUpperLimit) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now