File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ function TSimpleRTTI<T>.__BindValueToComponent(aComponent: TComponent;
166
166
(aComponent as TEdit).Text := aValue;
167
167
168
168
if aComponent is TComboBox then
169
- (aComponent as TComboBox).ItemIndex := (aComponent as TComboBox).Items.IndexOf( aValue);
169
+ (aComponent as TComboBox).ItemIndex := (aComponent as TComboBox).Items.IndexOfObject(TObject(Integer( aValue)) );
170
170
171
171
{ $IFDEF VCL}
172
172
if aComponent is TRadioGroup then
@@ -256,7 +256,7 @@ function TSimpleRTTI<T>.__GetComponentToValue(aComponent: TComponent): TValue;
256
256
Result := TValue.FromVariant((aComponent as TEdit).Text);
257
257
258
258
if aComponent is TComboBox then
259
- Result := TValue.FromVariant ((aComponent as TComboBox).Items[(aComponent as TComboBox).ItemIndex]);
259
+ Result := Integer ((aComponent as TComboBox).Items.Objects [(aComponent as TComboBox).ItemIndex]);
260
260
261
261
{ $IFDEF VCL}
262
262
if aComponent is TRadioGroup then
You can’t perform that action at this time.
0 commit comments