Sign in to follow this  
Followers 0
Gillboss

Set Data GuiCtrlCreateDate

8 posts in this topic

How can i set data GuiCtrlCreateDate()?

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

any?

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
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

When the words fail... music speaks

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Hi,

is there a way to set date to "none" or just empty?

GUICtrlSetData($date,"") does not work. It shows today date. :(

Share this post


Link to post
Share on other sites

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.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks dmob! I think this is the only one and the best solution! :D 

Share this post


Link to post
Share on other sites

:thumbsup:

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  
Followers 0