📄 uloadimage.pas
字号:
unit uLoadImage;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,DesignIntf,typinfo;
type
TGPictureForm = class(TForm)
GroupBox1: TGroupBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
TGGraphicEditor = class(TBasePropertyEditor)
public
//function GetAttributes: TPropertyAttributes; override;
//procedure Edit; override;
procedure Initialize;override;
procedure SetPropEntry(Index:Integer;AInstance:TPersistent;APropInfo:PPropInfo);override;
end;
procedure Register;
implementation
uses GGraphic;
{$R *.dfm}
procedure Register;
begin
DesignIntf.RegisterPropertyEditor(TypeInfo(TGraphicExGraphic),nil,'',TGGraphicEditor);
end;
(******************************************************************************)
procedure TGGraphicEditor.Initialize;
begin
end;
procedure TGGraphicEditor.SetPropEntry(Index:Integer;AInstance:TPersistent;APropInfo:PPropInfo);
var
frm:TGPictureForm;
begin
frm:=TGPictureForm.Create(nil);
try
if frm.ShowModal=mrOK then
begin
end;
finally
FreeAndNil(frm);
end;
end;
(*
function TGGraphicEditor.GetAttributes: TPropertyAttributes;
begin
{GetAttributes}
Result := [paDialog]
end;
procedure TGGraphicEditor.Edit;
begin
{Edit}
with TGPictureForm.Create(nil) do
try
TGraphicExGraphic(GetOrdValue).Create;
if ShowModal = mrOk then
begin
end;
finally
Free
end
end;
*)
initialization
finalization
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -