Jump to content
Sign in to follow this  

GUICtrlEdit Line Colors?

Recommended Posts


I'm curious if it's possible to change the colors of lines in a guictrledit. By default I've got the background black and the text white, but there are instances where I would like the occasional red or yellow text. Can this be accomplished without changing all of the text color? Would I have to switch to a rich text style of box? Thank you in advance.

This is a very rough sample of what I'm working with at the moment:

Global $upWin = GUICreate($title, 450, 250)
Global $log = GUICtrlCreateEdit("", -1, -1, 452, 252, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $WS_VSCROLL))
GUICtrlSetBkColor($log, 0x000000)
GUICtrlSetColor($log, 0xffffff)
GUICtrlSetFont($log, 9, 500, -1, "Lucida Console")
_GUICtrlEdit_SetMargins($log, BitOR($EC_LEFTMARGIN, $EC_RIGHTMARGIN), 5, 5)
GUICtrlSetState(-1, $GUI_FOCUS)

Share this post

Link to post
Share on other sites

Yu have to chage to RichEdit.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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