Hi all !
I use a class TRichEdit.
How can I get/change the color of selected text ?
How can I get/change the background color of the selected text ?
Hi all !
I use a class TRichEdit.
How can I get/change the color of selected text ?
How can I get/change the background color of the selected text ?
Use oRichEdit:Colorize( nStart, nEnd, nColor )
No, only the foreground color
thank you.
Where can I find a description of the functions riched20.dll ?
Natter,
To change background color checkout ReSetHighlight(). Below is sample code where I'm using it. ReSetHighlight() automatically changes the background color only on the selected rich text region.
//------------------------------------------------------------------------------------------------------------------------------
METHOD RTFHighlight() CLASS PATHTRANS
LOCAL nClrHigh := ReGetHighlight( ::oActive:hWnd )
LOCAL nClrBack := ChooseColor( nClrHigh )
if !( nClrHigh == nClrBack )
ReSetHighLight( ::oActive:hWnd, nClrBack )
::oActive:lChanged := .T.
endif
RETURN NIL
Reinaldo.
Thank you Reinaldo !
Why object TRichEdit not working correctly on the window type "DIALOG" ?
If you place this object type window "WINDOW", then everything is fine