Sign in to follow this  
Followers 0
Info

GUICtrlCreateEdit() unchangeable...

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Dampe

Share this post


Link to post
Share on other sites

Just noticed I posted it in the wrong forum -.-"

And thanks :)

Share this post


Link to post
Share on other sites

Remove $ES_READONLY style.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Why?

Edited by Info

Share this post


Link to post
Share on other sites

Why?

Forgot. I was don`t understand you completely. :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Info

Share this post


Link to post
Share on other sites

UP...

=[

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