Jump to content

Update a control while GUI is running


Recommended Posts

I had to edit this because I figured out my first question. Here is my second

I have an inputbox and as the user checks boxes in the gui I want the default text in the input box to update.

Thanks in Advance

Edited by burners

~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK

Link to comment
Share on other sites

like this...

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=..\Test.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include<array.au3>


Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 625, 445, 193, 125)
GUISetState(@SW_SHOW)

dim $Button[11]
dim $label[11]

$g=20
for $x=1 to ubound($Button)-1
$Button[$x] = GUICtrlCreateCheckbox("click me", 5, 24+$g, 65, 25)
GUICtrlSetOnEvent(-1,"butt")
$g+=20

Next

$lbl=GUICtrlCreateinput("QTY",100,50,50,20)

while 1
    sleep(50)
    WEnd


func butt()
    Local $iD = @GUI_CtrlId
$lbl_ct=0
    for $b=$button[1] to $button[10]
       if BitAnd(GUICtrlRead($b),$GUI_CHECKED) Then
           $lbl_ct+=1
        EndIf
    Next
    GUICtrlSetData($lbl,$lbl_ct)
    EndFunc
Edited by Aceguy
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...