Info Posted March 7, 2008 Posted March 7, 2008 #include <GUIConstants.au3> $Form2 = GUICreate("Form2", 242, 130, 303, 219) $Edit1 = GUICtrlCreateEdit("", 0, 0, 185, 129, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd The background color of GUICtrlCreateEdit is just disgusting Possible to change it?
Dampe Posted March 7, 2008 Posted March 7, 2008 (edited) This can be done using the following command: GUICtrlSetBkColor ($Control_ID, "color") Example: #include <GUIConstants.au3> $Form2 = GUICreate("Form2", 242, 130, 303, 219) $Edit1 = GUICtrlCreateEdit("", 0, 0, 185, 129, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetBkColor (-1, 0xFFFFFF);Enter background color here GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited March 7, 2008 by Dampe
Info Posted March 7, 2008 Author Posted March 7, 2008 Just noticed I posted it in the wrong forum -.-" And thanks
Info Posted March 7, 2008 Author Posted March 7, 2008 (edited) Another problem... My child GUI: $LogGUI = GUICreate("View Log", 224, 114, 400, 300, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE)) GUISetBkColor (0x000000) $LogEdit = GUICtrlCreateEdit("", 0, 0, 153, 113, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) GUICtrlSetBkColor ($LogEdit, 0xFFFFFF);Enter background color here That's my While: While 1; MAIN GUI $msg = GUIGetMsg(); MAIN GUI Select; MAIN GUI Case $msg = $GUI_EVENT_CLOSE; MAIN GUI Exit; MAIN GUI Case $msg = $LogButton; CHILD GUI GUISetState(@SW_SHOW, $LogGUI); CHILD GUI The problem is that when I press on the 'X' in my child GUI, it exits from the main GUI too... I want it to exit only from the child GUI... I tried: Case $msg = $LogButton GUISetState(@SW_SHOW, $LogGUI) Case $msg = $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $LogGUI) And: Case $msg = $LogButton GUISetState(@SW_SHOW, $LogGUI) Case $msg = $GUI_EVENT_CLOSE GUISetState(@SW_DISABLE, $LogGUI) And: Case $msg = $LogButton GUISetState(@SW_SHOW, $LogGUI) Case $msg = $GUI_EVENT_CLOSE GUIDelete($LogGUI) And nothing worked... Help me please Edited March 7, 2008 by Info
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