Jump to content
Sign in to follow this  
burners

Update a control while GUI is running

Recommended Posts

burners

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

Share this post


Link to post
Share on other sites
burners

I managed to answer both of my questions


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

Share this post


Link to post
Share on other sites
Jayson

Don't edit by deleting old question/stuff solved because other could benefit.

Share this post


Link to post
Share on other sites
Aceguy

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

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.