📄 rm_grped.pas
字号:
{*****************************************}
{ }
{ Report Machine v2.0 }
{ Group band editor }
{ }
{*****************************************}
unit RM_grped;
interface
{$I RM.inc}
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, RM_Class, RM_Const, ExtCtrls, Buttons;
type
TRMGroupEditorForm = class(TForm)
btnOK: TButton;
btnCancel: TButton;
GB1: TGroupBox;
Edit1: TEdit;
btnExpr: TSpeedButton;
procedure btnExprClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure Localize;
public
{ Public declarations }
procedure ShowEditor(View: TRMView);
procedure ShowTagEditor(t: TRMView);
end;
implementation
uses RM_Utils, RM_DlgExpr;
{$R *.DFM}
procedure TRMGroupEditorForm.Localize;
begin
Font.Name := RMLoadStr(SRMDefaultFontName);
Font.Size := StrToInt(RMLoadStr(SRMDefaultFontSize));
Font.Charset := StrToInt(RMLoadStr(SCharset));
Caption := RMLoadStr(rmRes + 490);
GB1.Caption := RMLoadStr(rmRes + 491);
btnExpr.Hint := RMLoadStr(rmRes + 492);
btnOK.Caption := RMLoadStr(SOk);
btnCancel.Caption := RMLoadStr(SCancel);
end;
procedure TRMGroupEditorForm.ShowTagEditor(t: TRMView);
begin
Caption := '对象Tag';
Edit1.Text := t.Tag;
if ShowModal = mrOk then
begin
RMDesigner.BeforeChange;
t.Tag := Edit1.Text;
end;
end;
procedure TRMGroupEditorForm.ShowEditor(View: TRMView);
begin
Caption := '分组';
Edit1.Text := (View as TRMBandView).GroupCondition;
if ShowModal = mrOk then
begin
RMDesigner.BeforeChange;
(View as TRMBandView).GroupCondition := Edit1.Text;
end;
end;
procedure TRMGroupEditorForm.btnExprClick(Sender: TObject);
var
expr: string;
begin
expr := '';
if RM_DlgExpr.RMGetExpression('', expr, nil) then
begin
if expr <> '' then
Edit1.Text := expr;
end;
end;
procedure TRMGroupEditorForm.FormCreate(Sender: TObject);
begin
Localize;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -