📄 rm_frameprop.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));
CBLeftVisible.Caption := RMLoadStr(rmRes + 796);
CBTopVisible.Caption := RMLoadStr(rmRes + 797);
CBRightVisible.Caption := RMLoadStr(rmRes + 798);
CBBottomVisible.Caption := RMLoadStr(rmRes + 799);
GroupBox2.Caption := RMLoadStr(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 + -