Jump to content

Set Data GuiCtrlCreateDate


Gillboss
 Share

Recommended Posts

How can i set data GuiCtrlCreateDate()?

i tried with GuiCtrlSetData(), but its not work..

any?

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

Opt('MustDeclareVars', 1)

Local $date, $msg

GUICreate("My GUI get date", 200, 200, 800, 200)
$date = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20)
GUICtrlSetData($date,"2008/09/27")
GUISetState()

; Run the GUI until the dialog is closed
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE

MsgBox(0, "Date", GUICtrlRead($date))
GUIDelete()

Read the helpfile first!

Link to comment
Share on other sites

How can i set data GuiCtrlCreateDate()?

i tried with GuiCtrlSetData(), but its not work..

any?

GUICreate("My GUI get date",200,200,-1,-1)
$date = GUICtrlCreateDate("", 10, 10, 185, 20)
GUICtrlSetData($date,"2008/09/27")
GUISetState()

Do
    $msg = GUIGetMsg()
Until $msg = -3
Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
 #include <DateTimeConstants.au3>
 
 Opt('MustDeclareVars', 1)
 
 Local $date, $msg
 
 GUICreate("My GUI get date", 200, 200, 800, 200)
 $date = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20)
 GUICtrlSetData($date,"2008/09/27")
 GUISetState()
 
; Run the GUI until the dialog is closed
 Do
     $msg = GUIGetMsg()
 Until $msg = $GUI_EVENT_CLOSE
 
 MsgBox(0, "Date", GUICtrlRead($date))
 GUIDelete()

Read the helpfile first!

ok, sorry i read only help file of GuiCtrlSetData().. thx
Link to comment
Share on other sites

  • 5 years later...

Whenever I have that kind of need I create an input and the date control
next to it, resized to show only drop-down arrow. When user selects date

I then copy date selected to input. This allows me to have blanks or whatever
other value the situation dictates.

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