lcd_ped.pas
来自「一个很好的DELPHI界面控件」· PAS 代码 · 共 44 行
PAS
44 行
{******************************************************************************}
{ }
{ TLCDLabel v1.3 - Property Editor for the Custom font filename. }
{ (c) 1998 - Peter Czidlina }
{ }
{******************************************************************************}
unit LCD_Ped;
interface
uses
Forms, Dialogs, StdCtrls, DsgnIntF, TypInfo;
type
TFileNameProperty = class(TStringProperty)
function GetAttributes : TPropertyAttributes; override;
procedure Edit; override;
end;
implementation
function TFileNameProperty.GetAttributes : TPropertyAttributes;
begin
Result := [paDialog];
end;
procedure TFileNameProperty.Edit;
var
FileOpenReq : TOpenDialog;
begin
FileOpenReq := TOpenDialog.Create(Application);
try
FileOpenReq.Title := 'Open custom font file';
FileOpenReq.Filter:= 'Font files|*.fnt';
if FileOpenReq.Execute then
SetStrValue(FileOpenReq.FileName);
finally
FileOpenReq.Free;
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?