![Waving :wave:](./images/smilies/icon_wave.gif)
Please help me
![Smile :)](./images/smilies/icon_e_smile.gif)
What I need and what I tried:
;---------------------------------------------
For background change:
MyRichEdit.SetBgColor(a9f874)
;---------------------------------------------
Positioning caret at 0 character
MyRichEdit.ScrollPos(PosString=0)
MyRichEdit.ScrollPos(0)
Text will be added to bottom of the richedit control, but the caret should be at top.
• After adding text also we can position the caret
MyRichEdit.SetText(clipboard)
;---------------------------------------------
ReadOnly
I also would like to make the edit control of richedit +readonly, means I should be able to append the results to edit control but user should not be able to change or delete it.
MyRichEdit := NEW RICHEDIT(%appname%,"w1000 h600 vmyedit +readonly")
* after appending results we can make it readonly afterwards also.
;---------------------------------------------
Thanks in advance for your help and support.
Code: Select all
Gui, +Hwnd%appname%
#include %A_ScriptDir%\Class_RichEdit.ahk
Gui, Add, Text, Hello
MyRichEdit := NEW RICHEDIT(%appname%,"X10 Y10 H300 W500")
Gui, Show, Center h320 w520, %AppName%
Sleep 1000
MyRichEdit.SetText(clipboard, ["SELECTION"])
Sleep 1000
; new code
Return
f2::
MyRichEdit.SetText(clipboard, ["SELECTION"])
Return