Skip to content

Commit 5032895

Browse files
committed
Including TComboBox wrapper
1 parent 88eb795 commit 5032895

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

Source/fmx/WrapFmxListBox.pas

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,28 @@ TPyDelphiListBox = class(TPyDelphiCustomListBox)
4040
write SetDelphiObject;
4141
end;
4242

43+
TPyDelphiCustomComboBox = class(TPyDelphiStyledControl)
44+
private
45+
function GetDelphiObject: TCustomComboBox;
46+
procedure SetDelphiObject(const Value: TCustomComboBox);
47+
public
48+
class function DelphiObjectClass: TClass; override;
49+
// Properties
50+
property DelphiObject: TCustomComboBox read GetDelphiObject
51+
write SetDelphiObject;
52+
end;
53+
54+
TPyDelphiComboBox = class(TPyDelphiCustomComboBox)
55+
private
56+
function GetDelphiObject: TComboBox;
57+
procedure SetDelphiObject(const Value: TComboBox);
58+
public
59+
class function DelphiObjectClass: TClass; override;
60+
// Properties
61+
property DelphiObject: TComboBox read GetDelphiObject
62+
write SetDelphiObject;
63+
end;
64+
4365
implementation
4466

4567
uses
@@ -73,6 +95,8 @@ procedure TListBoxRegistration.RegisterWrappers(
7395
APyDelphiWrapper.RegisterDelphiWrapper(TPyListBoxItem);
7496
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomListBox);
7597
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiListBox);
98+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiCustomComboBox);
99+
APyDelphiWrapper.RegisterDelphiWrapper(TPyDelphiComboBox);
76100
end;
77101

78102
{ TPyListBoxItem }
@@ -127,6 +151,40 @@ procedure TPyDelphiListBox.SetDelphiObject(const Value: TListBox);
127151
inherited DelphiObject := Value;
128152
end;
129153

154+
{ TPyDelphiCustomComboBox }
155+
156+
class function TPyDelphiCustomComboBox.DelphiObjectClass: TClass;
157+
begin
158+
Result := TCustomComboBox;
159+
end;
160+
161+
function TPyDelphiCustomComboBox.GetDelphiObject: TCustomComboBox;
162+
begin
163+
Result := TCustomComboBox(inherited DelphiObject)
164+
end;
165+
166+
procedure TPyDelphiCustomComboBox.SetDelphiObject(const Value: TCustomComboBox);
167+
begin
168+
inherited DelphiObject := Value;
169+
end;
170+
171+
{ TPyDelphiComboBox }
172+
173+
class function TPyDelphiComboBox.DelphiObjectClass: TClass;
174+
begin
175+
Result := TComboBox;
176+
end;
177+
178+
function TPyDelphiComboBox.GetDelphiObject: TComboBox;
179+
begin
180+
Result := TComboBox(inherited DelphiObject)
181+
end;
182+
183+
procedure TPyDelphiComboBox.SetDelphiObject(const Value: TComboBox);
184+
begin
185+
inherited DelphiObject := Value;
186+
end;
187+
130188
initialization
131189
RegisteredUnits.Add(TListBoxRegistration.Create);
132190

0 commit comments

Comments
 (0)