To draw a line
Posted: Thu Aug 16, 2007 11:06 am
Hello,
I want to draw a line from the left memo border to the right memo border (like a pagebreak but without producing a new page in the print).
The horzline must be independent from font.size.
In RichViewActions I found
{ TrvActionInsertHLine }
constructor TrvActionInsertHLine.Create(AOwner: TComponent);
begin
inherited;
Color := clWindowText;
Width := 1;
FMessageID := rvam_act_InsertHLine;
end;
procedure TrvActionInsertHLine.ExecuteTarget(Target: TObject);
begin
GetControl(Target).InsertBreak(Width, rvbsLine, Color);
end;
procedure TrvActionInsertHLine.UpdateTarget(Target: TObject);
var rve: TCustomRichViewEdit;
begin
if not RVA_ActionsEnabled or Disabled then begin
Enabled := False;
exit;
end;
rve := GetControl(Target).TopLevelEditor;
Enabled := {not rve.ReadOnly and} (rve.RVData.PartialSelectedItem=nil);
end;
but I can't change code so that it runs.
Who has an idea ?
Jürgen
I want to draw a line from the left memo border to the right memo border (like a pagebreak but without producing a new page in the print).
The horzline must be independent from font.size.
In RichViewActions I found
{ TrvActionInsertHLine }
constructor TrvActionInsertHLine.Create(AOwner: TComponent);
begin
inherited;
Color := clWindowText;
Width := 1;
FMessageID := rvam_act_InsertHLine;
end;
procedure TrvActionInsertHLine.ExecuteTarget(Target: TObject);
begin
GetControl(Target).InsertBreak(Width, rvbsLine, Color);
end;
procedure TrvActionInsertHLine.UpdateTarget(Target: TObject);
var rve: TCustomRichViewEdit;
begin
if not RVA_ActionsEnabled or Disabled then begin
Enabled := False;
exit;
end;
rve := GetControl(Target).TopLevelEditor;
Enabled := {not rve.ReadOnly and} (rve.RVData.PartialSelectedItem=nil);
end;
but I can't change code so that it runs.
Who has an idea ?
Jürgen