Sign in to follow this  
Followers 0
Jackchar

How to Get value By CtrlId!

5 posts in this topic

If there Is a @GUI_CtrlId,how to use it and read the control's value .

GUICtrlRead(@GUI_CtrlId)

Above Cann't Get

Share this post


Link to post
Share on other sites



@GUI_CtrlId is based on On-Event-Mode

see options in help

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Example:

Opt('GuiOnEventMode', 1)

Dim $hGUI = GUICreate('', 100, 250)

For $i = 0 To 1
    For $j = 1 To 10
        GUICtrlCreateLabel(Chr(Random(65, 90, 1)), $i*30+15, $j*20+15, 30, 20)
        GUICtrlSetOnEvent(-1, 'MyFunc')
    Next
Next

GUISetOnEvent(-3, '_EXIT')
GUISetState()

While 1
    Sleep(20)
WEnd

Func _EXIT()
    GUIDelete()
    Exit
EndFunc


Func MyFunc()
    ConsoleWrite(GUICtrlRead(@GUI_CtrlId) & @LF)
EndFunc

=] =] =] Edit

Edited by Authenticity

Share this post


Link to post
Share on other sites

Authenticity

thanks

:P

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  
Followers 0