📄 grids1.pas
字号:
unit grids1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
te_controls, ksthemeforms, StdCtrls, Grids, ksthemegrids;
type
TfrmGrids = class(TForm)
NgForm1: TTeThemeForm;
Label1: TLabel;
Label2: TLabel;
TeThemeDrawGrid1: TTeThemeDrawGrid;
TeThemeStringGrid1: TTeThemeStringGrid;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmGrids: TfrmGrids;
implementation
uses Main;
{$R *.DFM}
{procedure TfrmGrids.TeThemeDrawGrid1DrawCell(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
var
Index: integer;
begin
with TeThemeDrawGrid1, TeThemeDrawGrid1.Canvas do
begin
if gdFixed in State then Exit;
if State * [gdSelected, gdFocused] <> [] then
Brush.Color := clHighlight
else
Brush.Color := Color;
Canvas.FillRect(Rect);
Canvas.Font.Color := clRed;
Canvas.Font.Name := 'Arial';
Canvas.Font.Size := 6;
Canvas.TextRect(Rect, Rect.Left, Rect.Top, 'Custom Draw');
end;
end; }
procedure TfrmGrids.FormCreate(Sender: TObject);
var
i, j: integer;
begin
for i := 0 to TeThemeStringGrid1.ColCount - 1 do
begin
TeThemeStringGrid1.Cells[i, 0] := 'Column '+IntToStr(i);
for j := 1 to TeThemeStringGrid1.RowCount - 1 do
TeThemeStringGrid1.Cells[i, j] := 'string '+IntToStr(i)+':'+IntToStr(j);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -