Skip to content

Great but for TRichEdit #6

@limelect

Description

@limelect

How to change for richedit?

  Form1.Rich1.SelAttributes.Color := clRed;
  Form1.Rich1.SelAttributes.Style := [fsBold];

I tried

TRichEdit= Class (Vcl.ComCtrls.TRichEdit);

TRichEditStyleHookColor = class(TRichEditStyleHook)
private
procedure UpdateColors;
protected
procedure WndProc(var Message: TMessage); override;
public
constructor Create(AControl: TWinControl); override;
end;

if Control.Enabled then
begin
Brush.Color := TWinControlH(Control).Color;
SelAttributes.Color:=TWinControlH(Control).Color;<<< dose not work
FontColor := TWinControlH(Control).Font.Color;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions