Gillboss Posted September 27, 2008 Posted September 27, 2008 How can i set data GuiCtrlCreateDate()? i tried with GuiCtrlSetData(), but its not work.. any?
bluelamp Posted September 27, 2008 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!
Andreik Posted September 27, 2008 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
Gillboss Posted September 27, 2008 Author 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
broliukaz Posted April 25, 2014 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.
dmob Posted April 25, 2014 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
broliukaz Posted April 25, 2014 Posted April 25, 2014 Thanks dmob! I think this is the only one and the best solution!
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