Hello,
I have a TsDBRadioGroup on my form. The items-property ist set to:
- simple label
- enhanced label
The values-property is set to
Database field is CHAR(1) with value “e”.
At designtime all works fine. When I set the query active, the radiogroup marks the item for “e” (“enhanced label”).
At runtime the following code during the start of the application fails:
Code:
Application.CreateForm(TfrmSettings, frmSettings);
The message is (translated from german): “List index out of range (1)”
The debugger shows the following code from the unit sDBRadioGroup:
Code:
procedure TsDBRadioGroup.DataChange(Sender: TObject);
begin
if FDataLink.Field <> nil then
Value := FDataLink.Field.Text
else
Value := '';
end;
The line “Value := FDataLink.Field.Text” is marked in debugger.
I tried to change the values-field to “0” and “1” for the both settings – same result.
Also I tried to change the field-type to numeric (maybe that the ItemIndex is used instead of the values-property) – same result.
What is wrong here?
thanks,
Siegbert