Kaso Posted November 9, 2005 Posted November 9, 2005 Is it possible to change the color of the inputctrl when the cursor is in the ctrl. Making it easier to see which box you are typing in?
GaryFrost Posted November 11, 2005 Posted November 11, 2005 (edited) #include <GUIConstants.au3> If Not IsDeclared('White') Then Dim $White = 0xffffff If Not IsDeclared('Midnight_Blue') Then Dim $Midnight_Blue = 0x191970 If Not IsDeclared('Black') Then Dim $Black = 0x000000 If Not IsDeclared('White') Then Dim $White = 0xFFFFFF GUICreate(" My GUI input acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateInput("", 10, 5, 300, 20) GUICtrlSetState(-1, $GUI_ACCEPTFILES) $nofile = GUICtrlCreateInput("", 10, 35, 300, 20); will not accept drag&drop files $btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn ExitLoop EndSelect If ControlGetFocus(" My GUI input acceptfile") = "Edit1" Then GUICtrlSetColor($file, $White) GUICtrlSetBkColor($file, $Midnight_Blue) GUICtrlSetColor($nofile, $Black) GUICtrlSetBkColor($nofile, $White) ElseIf ControlGetFocus(" My GUI input acceptfile") = "Edit2" Then GUICtrlSetColor($file, $Black) GUICtrlSetBkColor($file, $White) GUICtrlSetColor($nofile, $White) GUICtrlSetBkColor($nofile, $Midnight_Blue) EndIf WEnd MsgBox(4096, "drag drop file", GUICtrlRead($file)) Edited November 11, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Kaso Posted November 11, 2005 Author Posted November 11, 2005 thank you very much. I can work from this.
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