⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rm_frameprop.pas

📁 进销存管理 编译环境Delphi7+Win2000 用到的控件 ReportMachine2.6 InfoPower4000Pro_vcl7 RxLib2.7 SkinEngine 3
💻 PAS
字号:
unit RM_FrameProp;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ComCtrls, StdCtrls, Buttons;

type
  TRMFormFrameProp = class(TForm)
    GroupBox1: TGroupBox;
    EDLeftStyle: TComboBox;
    CBLeftVisible: TCheckBox;
    CBTopVisible: TCheckBox;
    CBRightVisible: TCheckBox;
    CBBottomVisible: TCheckBox;
    EDBottomStyle: TComboBox;
    EDRightStyle: TComboBox;
    EDTopStyle: TComboBox;
    EDBottomWidth: TEdit;
    EDRightWidth: TEdit;
    EDTopWidth: TEdit;
    EDLeftWidth: TEdit;
    UDLeftWidth: TUpDown;
    UDTopWidth: TUpDown;
    UDRightWidth: TUpDown;
    UDBottomWidth: TUpDown;
    GroupBox2: TGroupBox;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    SpeedButton3: TSpeedButton;
    SpeedButton4: TSpeedButton;
    SpeedButton5: TSpeedButton;
    SpeedButton6: TSpeedButton;
    btnOK: TBitBtn;
    btnCancel: TBitBtn;
    procedure EDLeftStyleDrawItem(Control: TWinControl; Index: Integer;
      Rect: TRect; State: TOwnerDrawState);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
		procedure Localize;
  public
    { Public declarations }
  end;

implementation

uses RM_Utils, RM_Const, RM_Const1;

{$R *.DFM}
                       
procedure TRMFormFrameProp.Localize;
begin
	Font.Name := RMLoadStr(SRMDefaultFontName);
  Font.Size := StrToInt(RMLoadStr(SRMDefaultFontSize));
  Font.Charset := StrToInt(RMLoadStr(SCharset));

  RMSetStrProp(CBLeftVisible, 'Caption', rmRes + 796);
  RMSetStrProp(CBTopVisible, 'Caption', rmRes + 797);
  RMSetStrProp(CBRightVisible, 'Caption', rmRes + 798);
  RMSetStrProp(CBBottomVisible, 'Caption', rmRes + 799);
  RMSetStrProp(GroupBox2, 'Caption', rmRes + 800);

	btnOk.Caption := RMLoadStr(SOK);
  btnCancel.Caption := RMLoadStr(SCancel);
end;

procedure TRMFormFrameProp.EDLeftStyleDrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
const
  LineWidth = 4;
var
  i: integer;
begin
  with TComboBox(Control).Canvas do
  begin
    Pen.Color := clBlack;
    Pen.Style := TPenStyle(index);
    Brush.Color := clWhite;
    FillRect(Rect);

    i := Rect.Top + (Rect.Bottom - Rect.Top - LineWidth) div 2;
    for i := i to i + LineWidth - 1 do
    begin
      MoveTo(Rect.Left + 3, i);
      LineTo(Rect.Right - 3, i);
    end;
  end;
end;

procedure TRMFormFrameProp.FormCreate(Sender: TObject);
var
  i: Integer;
begin
	Localize;
  for i := 0 to Integer(High(TPenStyle)) - 2 do
  begin
    EDLeftStyle.Items.Add('');
    EDTopStyle.Items.Add('');
    EDRightStyle.Items.Add('');
    EDBottomStyle.Items.Add('');
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -