Jump to content

GUICtrlCreateDate bgColor


Recommended Posts

I'd really like to change the background color of a Date control

and GUICtrlSetBkColor does not do it, help  :

#include <DateTimeConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 167, 99, 192, 114)
$Input1 = GUICtrlCreateInput("Input1", 16, 16, 121, 21)
GUICtrlSetBkColor(-1, 0xFF0000)
$Date1 = GUICtrlCreateDate("", 16, 48, 122, 21, 0)
GUICtrlSetBkColor(-1, 0xFF0000) ; <-- not working
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
 
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Help file -> "Only Button, Label, Checkbox, Group, Radio, Edit, Input, List, Listview, ListviewItem, Treeview, TreeviewItem, Graphic, Progress, Slider and Combo controls can currently be colored."

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Help file -> "Only Button, Label, Checkbox, Group, Radio, Edit, Input, List, Listview, ListviewItem, Treeview, TreeviewItem, Graphic, Progress, Slider and Combo controls can currently be colored."

 

yes, you're right but there must be a way to do it and I can't find it =/

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Yes, there is a way, create your own in C++

thanks for your help, but I'm looking to see if anyone would know a way to make a DLL call to erase the background and re-draw a set color, given that SendMessage of  "MSCS_BACKGROUND" don't work ( and I know that it is not Autoit at fault, Microsoft is  )

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

there are some links to other languages that may show what I need to get done but don't know how, and I've seen some ( to me ) masterful code by others that may lay a hand on my problem

http://stackoverflow.com/questions/198532/changing-the-background-color-of-a-datetimepicker-in-net

http://www.codeproject.com/Articles/30660/A-DateTimePicker-with-working-BackColor

 

thanks in advance

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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

×
×
  • Create New...