Gillboss Posted September 27, 2008 Share Posted September 27, 2008 How can i set data GuiCtrlCreateDate()? i tried with GuiCtrlSetData(), but its not work.. any? Link to comment Share on other sites More sharing options...
bluelamp Posted September 27, 2008 Share Posted September 27, 2008 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 More sharing options...
Andreik Posted September 27, 2008 Share Posted September 27, 2008 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 More sharing options...
Gillboss Posted September 27, 2008 Author Share Posted September 27, 2008 #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 More sharing options...
broliukaz Posted April 25, 2014 Share Posted April 25, 2014 Hi, is there a way to set date to "none" or just empty? GUICtrlSetData($date,"") does not work. It shows today date. Link to comment Share on other sites More sharing options...
dmob Posted April 25, 2014 Share Posted April 25, 2014 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. broliukaz 1 Link to comment Share on other sites More sharing options...
broliukaz Posted April 25, 2014 Share Posted April 25, 2014 Thanks dmob! I think this is the only one and the best solution! Link to comment Share on other sites More sharing options...
dmob Posted April 25, 2014 Share Posted April 25, 2014 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now