Jump to content

Recommended Posts

Posted

i want a _GUI_DTP() that displays the time in "hh:mm tt" format, but with no up/down control in it, is this possiable? i want to make my own up/down ctrl, that steps in 15 min intervals, i would just use GUICtrlCreateButton, for that, but i don't want to see the old up/down ctrl. thanks.

Posted (edited)

that sort of works, but still if i do $iStyle = BitAND($dts_timeformat, BitNOT($dts_updown) i still the dropdown for the month, so it doesnt quite work. thanks for the help.

here's what i got:

#include <GUIConstantsEx.au3>
#include <DateTimeConstants.au3>
#include <Date.au3>
#include <GuiDateTimePicker.au3>

$formMain = GUICreate("Test", 175, 75)
GUISetState()

$dtpCtrl = GUICtrlCreateDate('', 25, 25, 75, -1, BitAND($dts_timeformat, BitNOT($dts_updown)))
$dtpCtrlHandle = GUICtrlGetHandle($dtpCtrl)
_GUICtrlDTP_SetFormat($dtpCtrlHandle, "hh:mm tt")

$buttonUp = GUICtrlCreateButton("+", 100, 25, 25, 20)
$buttonDown = GUICtrlCreateButton("-", 125, 25, 25, 20)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $gui_event_close
            Exit
        Case $buttonUp
        Case $buttonDown
    EndSwitch
WEnd
Edited by redLabel

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
×
×
  • Create New...