Sign in to follow this  
Followers 0
McGod

Could this be done

6 posts in this topic

Ok Im making a GUI Log. So I wish to make something like

*******************

Error Occured: Something happened

*******************

=====================

Passed working now

=====================

In a GUI Edit, so different color text.

Share this post


Link to post
Share on other sites



different color text.

GuiCtrlSetColor()

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Would that work for different colors in the same control? Like in my edit control I could have red green yellow etc..

Or will I have to do a GUICtrlCreateLabel for each line ? :)

Edited by Chip

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Would that work for different colors in the same control? Like in my edit control I could have red green yellow etc..

I'm not sure, but i think its worth a try

considering its an error log I'm assuming you are having a program write this no?

If this is the case, can we see the portion of the code that writes the file?

Edit: i guess this wouldn't work...

I made this code to test it

#Include <GuiConstants.au3>
#Include <Misc.au3>

Global $Color = 0x000000

$GUI = GUICreate("Test Multi-color Edit", 400, 300)
$Edit = GUICtrlCreateEdit("Type here", 0, 0, 250, 250)
$Button = GUICtrlCreateButton("Color", 300, 40, 50, 25)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button
            $Color = _ChooseColor()
            GUICtrlSetColor($Edit, $Color)
    EndSwitch
WEnd
Edited by Paulie

Share this post


Link to post
Share on other sites

TY, worked perfectly! Exactly what i was looking for.

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