Skip to content

Commit 2e44f4b

Browse files
committed
Introducing the TSaveDialog - Embarcadero/DelphiVCL4Python#28
1 parent 583fcb0 commit 2e44f4b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Source/vcl/WrapVclDialogs.pas

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ TPyDelphiFileOpenDialog = class(TPyDelphiComponent)
4545
write SetDelphiObject;
4646
end;
4747

48+
TPyDelphiSaveDialog = class(TPyDelphiOpenDialog)
49+
private
50+
function GetDelphiObject: TSaveDialog;
51+
procedure SetDelphiObject(const Value: TSaveDialog);
52+
public
53+
class function DelphiObjectClass: TClass; override;
54+
// Properties
55+
property DelphiObject: TSaveDialog read GetDelphiObject
56+
write SetDelphiObject;
57+
end;
58+
4859
implementation
4960

5061
uses
@@ -102,6 +113,7 @@ procedure TDialogRegistration.RegisterWrappers(APyDelphiWrapper
102113
inherited;
103114
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiOpenDialog);
104115
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiFileOpenDialog);
116+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiSaveDialog);
105117
end;
106118

107119
{ TPyDelphiOpenDialog }
@@ -206,6 +218,23 @@ procedure TPyDelphiFileOpenDialog.SetDelphiObject(const Value: TFileOpenDialog);
206218
inherited DelphiObject := Value;
207219
end;
208220

221+
{ TPyDelphiSaveDialog }
222+
223+
class function TPyDelphiSaveDialog.DelphiObjectClass: TClass;
224+
begin
225+
Result := TSaveDialog;
226+
end;
227+
228+
function TPyDelphiSaveDialog.GetDelphiObject: TSaveDialog;
229+
begin
230+
Result := TSaveDialog(inherited DelphiObject);
231+
end;
232+
233+
procedure TPyDelphiSaveDialog.SetDelphiObject(const Value: TSaveDialog);
234+
begin
235+
inherited DelphiObject := Value;
236+
end;
237+
209238
initialization
210239
RegisteredUnits.Add(TDialogRegistration.Create);
211240
CoInitialize(nil);

0 commit comments

Comments
 (0)