Jump to content
Sign in to follow this  
dbzfanatic

GuiCtrlCreateEdit Limit?

Recommended Posts

dbzfanatic

Does GuiCtrlCreateEdit() have a limit? When I count up in hex I'm able to go from 0 to BB7(2999) but no farther, yet I can tell that my script is still counting since the edit control flashes as if it's trying to update. I looked in the helpfile and I didn't see anything about it having a display limit but I could have missed it, if there is one could someone please tell me what it is? If it helps my script displays like this:

00000000

00000001

00000002

00000003

...

00000BB5

00000BB6

00000BB7

Share this post


Link to post
Share on other sites
BrettF
dbzfanatic

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEX.au3>
#include <GuiEdit.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Counting in Hex", 194, 274, 193, 125)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 194, 273, -1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Dim $n, $string

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    For $n = 0 To Dec("FFFFFFF")
        $string = Hex($n) & @CRLF
        _GUICtrlEdit_AppendText($Edit1,$string)
    Next
WEnd

That's my full code, and I saw the limit for my text, it's 32,767. Is there anything that would be able to hold more text? I only know of input and edit boxes.

Share this post


Link to post
Share on other sites
BrettF

You must have missed rovers post....

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEX.au3>
#include <GuiEdit.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Counting in Hex", 194, 274, 193, 125)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 194, 273, -1)
 _GUICtrlEdit_SetLimitText($Edit1, 64000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Dim $n, $string

While 1
    For $n = 0 To Dec("FFFFFFF")
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
        EndSwitch

        $string = Hex($n) & @CRLF
        _GUICtrlEdit_AppendText ($Edit1, $string)
        ToolTip ($string)
    Next
WEnd

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.