Jump to content

Could this be done


McGod
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

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

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

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...