📄 unit1.pas
字号:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, RVScroll, RichView, RVEdit, RVStyle, ImgList, StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
ImageList1: TImageList;
RVStyle1: TRVStyle;
RichViewEdit1: TRichViewEdit;
ImageList2: TImageList;
procedure FormCreate(Sender: TObject);
procedure RichViewEdit1RVFImageListNeeded(Sender: TCustomRichView;
ImageListTag: Integer; var il: TCustomImageList);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{-------------------------------------------------------------------------------
RVStyle1.ListStyles[0] has two levels -
0th - imagelistcounter
1st - imagelist
-------------------------------------------------------------------------------}
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
const text = 'Text text text. Text text text text. Text text text. Text text text text. Text text text. Text text text text.';
begin
with RichViewEdit1 do begin
Clear;
for i := 1 to 5 do begin
SetListMarkerInfo(-1, 0, 0, 1, 0, False);
Add(text, 3);
SetListMarkerInfo(-1, 0, 1, 1, 0, False);
Add(text, 0);
SetListMarkerInfo(-1, 0, 1, 1, 0, False);
Add(text, 0);
SetListMarkerInfo(-1, 0, 1, 1, 0, False);
Add(text, 0);
end;
Format;
end;
end;
// This event is not used in this demo.
// But if you want to save and load this document in RVF, it is necessary.
// Note: ImageList1.Tag is set to 1, ImageList2.Tag is set to 2.
procedure TForm1.RichViewEdit1RVFImageListNeeded(Sender: TCustomRichView;
ImageListTag: Integer; var il: TCustomImageList);
begin
case ImageListTag of
1: il := ImageList1;
2: il := ImageList2;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -