trichedit

delphi TRichEdit Set background color excluding spaces

Hi! I found this code over the net. This puts background color to the selected texts on Trichedit: uses RichEdit; procedure RE_SetSelBgColor(RichEdit: TRichEdit; AColor: TColor); var Format: CHARFORMAT2; begin FillChar(Format, SizeOf(Format), 0); with Format do begin cbSize := SizeOf(Format); dwMask := CFM_BACKCOLOR; ...

Delphi TRichEdit Set background shape as rounded edge rectangle

My problem is to set the background shape to something like rounded edge rectangle. The fact that when you put background color on the text on TRichedit, the background shape would be a rectangle, not rounded edge. I would like to put some sample image but I don't know how. ...

Delphi: Center Specific Line in TRichEdit by Scrolling

I have a Delphi 2007 TRichEdit with several lines in it. I want to scroll the richedit vertically such that a specific line number if approximately centered in the visible/display area of the richedit. For example, I want to write the code for CenterLineInRichEdit in this example: procedure CenterLineInRichEdit(Edit: TRichEdit; LineNu...

Using TRichEdit at runtime without defining a parent

I need to use a TRichEdit at runtime to perform the rtf to text conversion as discussed here. I succeded in doing this but I had to set a dummy form as parent if not I cannot populate the TRichedit.Lines. (Error: parent is missing). I paste my funciton below, can anyone suggest a way to avoid to define a parent? Can you also comment on t...

Delphi - Keep highlighted selection in RichEdit when focus is lost

Hi, I have an TRichEdit. When I select some text and click on another element, the selection of the selected text disappears. Is there a way to keep this selection, also when the TRichEdit has los it's focus? Thanks! ...

TRichEdit color problems.

ans:= RichEdit1.Text for i:=1 to Length(ans) do begin RichEdit1.SelStart := i-1; RichEdit1.SelLength:= 1; if ans[i] = correct[i] then RichEdit1.SelAttributes.Color := clRed else RichEdit1.SelAttributes.Color := clBlue; If the letter in ans matches the letter in the same position as the letter in correct ...