Jump to content

GUICtrlCreateEdit() unchangeable...


Recommended Posts

#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?

Link to comment
Share on other sites

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 by Dampe
Link to comment
Share on other sites

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 by Info
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...