Skizmata Posted August 24, 2010 Share Posted August 24, 2010 (edited) I can't seem to figure out how to change the date displayed in a date control created with GUICtrlCreateDate(). In the help file there is a link to the function GUICtrlCreateDateGUICtrlUpdate() that doesn't seem to exist. I assumed that GUICtrlUpdate() was replaced by GUICtrlSetData() but it doesn't seem to work either. Your help is much appreciated. Thanks in advance. Edited August 24, 2010 by Skizmata AutoIt changed my life. Link to comment Share on other sites More sharing options...
4ggr35510n Posted August 24, 2010 Share Posted August 24, 2010 (edited) "Date : The date or time depending the style of the control."From GuiCtrlSetData. #include <GUIConstantsEx.au3> #include <DateTimeConstants.au3> ;i Example1() ; example1 Func Example1() Local $date, $msg GUICreate("My GUI get date", 200, 200, 800, 200) $date = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20) $button_change = GuiCtrlCreateButton("Change this sucker!", 50, 150) GUISetState() ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() If $msg = $button_change Then GUICtrlSetData($date, Random(2000,2010,1) & "/" & Random(10,12,1) & "/" & Random(10,28,1)) Until $msg = $GUI_EVENT_CLOSE MsgBox(0, "Date", GUICtrlRead($date)) GUIDelete() EndFunc ;==>Example1Read HelpFile more carefully :] Edited August 24, 2010 by 4ggr35510n Link to comment Share on other sites More sharing options...
Skizmata Posted August 24, 2010 Author Share Posted August 24, 2010 Thanks so much for the help. This was exactly what I needed. Aside from the snarky "Read HelpFile more carefully :]" comment. It would appear that the help file is incorrect and the line "To set or change information in the control see GUICtrlUpdate...." in GUICtrlCreateDate() should be a link to GUICtrlSetData() instead of GUICtrlUpdate(). I know this from a careful reading of the help file. AutoIt changed my life. Link to comment Share on other sites More sharing options...
4ggr35510n Posted August 24, 2010 Share Posted August 24, 2010 (edited) But inside GuiCtrlUpdate... chapter there was a link to GuiCtrlSetData.What's more, you have even correctly assumed you need GUISD function, inside which you could find suitable paragraph. I can't find 'snarky' in any dictionary, so I'll assume that it's a complement ;]Glad I could help Edited August 24, 2010 by 4ggr35510n Link to comment Share on other sites More sharing options...
Skizmata Posted August 24, 2010 Author Share Posted August 24, 2010 (edited) If you would read your dictionary more carefully you would find it. You can find common usage here, http://www.merriam-webster.com/dictionary/snarky. Since I expect a snarky asshole to say some nonsense about online dictionaries I also found it in my print edition of "The Oxford Dictionary of English Etymology" (1966) on page 840 where it says it is of or relating to the imaginary animal in 'Lewis Carroll' (C.L. Dodgson)'s "The Hunting of the Snark". Anyway, forums are the last vestige of this kind of back handed nonsense soon to be beat out entirely be systems like StackOverflow.com where credibility is built by getting the right answer (as you did) not by provoking more attention (as you also did). Forms foster condescension and arrogance among casual users to try to boost post count. When someone gives a good answer and does it like an arrogant jerk they are improving their odds of having another post to comment on. Since post count gets confused for creditability on these antiquated systems this is a self reinforcing mechanism that has always annoyed me. Thanks for the help you are very much correct. I don't think I will help bolster your post count any further. Edited August 24, 2010 by Skizmata AutoIt changed my life. Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 24, 2010 Share Posted August 24, 2010 Thanks so much for the help. This was exactly what I needed.Aside from the snarky "Read HelpFile more carefully :]" comment.It would appear that the help file is incorrect and the line "To set or change information in the control see GUICtrlUpdate...." in GUICtrlCreateDate() should be a link to GUICtrlSetData() instead of GUICtrlUpdate(). I know this from a careful reading of the help file.I don't think the helpfile is wrong, just poorly worded there as "information" implies the data. What they mean is "update an aspect of the control" whether it be the color, text, data, whatever of the control. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! 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