Jump to content

GUICtrlCreateInput question


Recommended Posts

Well ... adding a button is easy. 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Group1 = GUICtrlCreateGroup("Group1", 56, 56, 481, 225)
$Input1 = GUICtrlCreateInput("Input1", 80, 96, 153, 21)
$Input2 = GUICtrlCreateInput("Input2", 328, 96, 161, 21)
$Input3 = GUICtrlCreateInput("Input3", 80, 160, 153, 21)
$Input4 = GUICtrlCreateInput("Input4", 328, 160, 169, 21)
$button1 = GUICtrlCreateButton("DoIt", 250, 96, 50, 25)
$button2 = GUICtrlCreateButton("DoIt", 250, 160, 50, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $button1
            GUICtrlSetData($Input2, GUICtrlRead($Input1) + GUICtrlRead($Input2))
        Case $button2
            GUICtrlSetData($Input4, GUICtrlRead($Input3) + GUICtrlRead($Input4))
    EndSwitch
WEnd

 

Edited by Dan_555
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...