jimg Posted November 2, 2011 Share Posted November 2, 2011 I'm trying to create a GUI that includes an edit control where I want to be able to type something like an assembly language source. I later want to "step" though the code after clicking a "compile" button. I want to highlight a single line of the edit control. I've tried GUICtrlSetColor like this: $edit=GUICtrlCreateEdit("",10,10,500,790) GUICtrlSetColor($edit,0x0000ff) GuiCtrlSetData(-1,"blue","") GUICtrlSetColor($edit,0x00ff00) GuiCtrlSetData(-1,"green",1) but all the text ends up green. Is there another way? A text background color would be even better. Am I missing something? I hate to resort to a "=>" in the left column, although if that's all there is... Link to comment Share on other sites More sharing options...
Zedna Posted November 3, 2011 Share Posted November 3, 2011 (edited) Look at standard RichEdit UDF in the helpfile. Edited November 3, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jimg Posted November 3, 2011 Author Share Posted November 3, 2011 The script doesn't run on my PC, so I can't tell what it's supposed to do. Pop up describes a COM error. Windows 7. Link to comment Share on other sites More sharing options...
Zedna Posted November 3, 2011 Share Posted November 3, 2011 Examples from helpfile for _GUICtrlRichEdit_SetCharColor() _GUICtrlRichEdit_SetCharBkColor() work fine on my Win7 64bit Don't be so vague to get more help ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jimg Posted November 4, 2011 Author Share Posted November 4, 2011 So there's no way to have simultaneous multiple colors of text in a _GUICtrlEdit control? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 4, 2011 Share Posted November 4, 2011 So there's no way to have simultaneous multiple colors of text in a _GUICtrlEdit control?No, because that would be a Rich Edit control. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now