Jump to content
Sign in to follow this  

Is there a style for no up down arrows in a DTP?

Recommended Posts


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.

Share this post

Link to post
Share on other sites

Make sure the bit for $DTS_UPDOWN is cleared

$iStyle = BitAND($iYour_DTP_Style, BitNOT($DTS_UPDOWN))
$idDTP = GUICtrlCreateDate("", 20, 20, 100, 20, $iStyle)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

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)

$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
        Case $buttonUp
        Case $buttonDown
Edited by redLabel

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