Sign in to follow this  
Followers 0
au3scr

Clock

3 posts in this topic

hi

I have problem here,

"Time: " and "Hex" are on different lines, How i can put them on 1 line?

#include <GUICONSTANTS.au3>
#include <String.au3>

global $hour = @HOUR
global $min = @MIN
global $sec = @SEC

$t = GUICreate("Clock", 250, 50)
$aeg = GUICtrlCreateLabel("Time: " & @HOUR & ":" & @MIN & ":" & @SEC, 10, 10)
$aeghex = GUICtrlCreateLabel("Time: " & $hour & ":" & $MIN & ":" & $SEC, 10, 30)
GUISetState(@SW_SHOW)
AdlibEnable("Do_Function", 1000)
While 1
    $tMsg = GUIGetMsg()
    Switch $tMsg
        Case $GUI_EVENT_CLOSE
            GUIDelete($t)
            ExitLoop
    EndSwitch
WEnd

Func Do_Function()
    GUICtrlSetData($aeg, "Time: " & @HOUR & ":" & @MIN & ":" & @SEC)
    $hourh = @hour
    $minh = @min
    $sech = @SEC
    $hourhh = _StringToHex ($hourh)
    $minhh = _StringToHex ($minh)
    $sechh = _StringToHex ($sech)
    GUICtrlSetData($aeghex, "Time: " & $hourhh & ":" & $minhh& ":" & $sechh)
    GUICtrlSetData ($hour,@hour)
    GUICtrlSetData ($min,@min)
    GUICtrlSetData ($sec,@SEC)
EndFunc   ;==>Do_Function

Share this post


Link to post
Share on other sites



increase the width of the label and it will be fixed.

Share this post


Link to post
Share on other sites

$aeg = GUICtrlCreateLabel("Time: " & @HOUR & ":" & @MIN & ":" & @SEC, 10, 10,200)

$aeghex = GUICtrlCreateLabel("Time: " & $hour & ":" & $MIN & ":" & $SEC, 10, 30,200)

:D


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