Jump to content

Can't get up-down to advance numbers higher


Gordo54
 Share

Recommended Posts

I have a simple GUI with an up-down control and I cannot get the numbers to advance higher by pressing the up button. Here is my code:

;========================================================================
;  Create GUI
;========================================================================
#include <GuiConstants.au3>

GuiCreate("Heartbeat Application", 400, 325)


;Label
GUICtrlCreateLabel("Heartbeat Application", 10, 10, 375, 30)
GUICtrlSetFont(-1, 17)

;Start & Pause Button
$start_button = GUICtrlCreateButton("Start", 10, 270, 65, 25)
$pause_button = GUICtrlCreateButton("Stop", 80, 270, 65, 25)

;Progress Timer
GUICtrlCreateProgress(150, 270, 240, 25, $PBS_SMOOTH)
GUICtrlSetData (-1, 0)

; UPDOWN
GuiCtrlCreateLabel("Test Interval", 325, 10)
GuiCtrlCreateInput("5", 325, 30, 60, 20, $ES_NUMBER)
GuiCtrlCreateUpDown(-1,$UDS_ARROWKEYS)

;Response Box
GUICtrlCreateInput("Test", 10, 60, 380, 100, $ES_MULTILINE)
;GUICtrlCreateInput("Test", 10, 60, 380, 200, $ES_MULTILINE)
GUICtrlSetData(-1, "Click Start To Begin....")

;========================================================================
; Begin
;========================================================================

; GUI MESSAGE LOOP
GUISetState()
While 1 
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE    
            Exit
        Case $msg = $start_button
            MsgBox(32, "Help", "Text" & @CRLF & "More Text")                
    EndSelect
WEnd

Thanks in advance for your help!

Link to comment
Share on other sites

Awesome - thank you!

It is weird to me that the long label would affect the up and not anything else...hmmmm...

Thanks again!

I have seen this many times ( I know to look because i did it too! )

Actually ( without checking ) the label must have just covered the "up" otherwise the "down" would not work either if it was covered by the label

either way, Glad to have helped

8)

NEWHeader1.png

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...