setting a checkbox checked value through code
hello,
im trying to set the checked property on a checkbox through code with the
following code:
evalReport.ObjectByName(bandIndex, objectIndex, 'gpwsCheckbox');
lObject := evalReport.bands[bandindex].objects[objectIndex];
lObject.checked := true;
but when i compile it does not recognize the checked property. Do i need to
cast lObject to a TmyCheckbox before i can set the value? if so how do a
cast?
thanks
matt
im trying to set the checked property on a checkbox through code with the
following code:
evalReport.ObjectByName(bandIndex, objectIndex, 'gpwsCheckbox');
lObject := evalReport.bands[bandindex].objects[objectIndex];
lObject.checked := true;
but when i compile it does not recognize the checked property. Do i need to
cast lObject to a TmyCheckbox before i can set the value? if so how do a
cast?
thanks
matt
This discussion has been closed.
Comments
if Assigned(lObject) and (lObject is TppCheckBox) then
TppCheckBox(lObject).Checked := True;
or whatever the class name is (eg. TmyCheckBox )
Note that this will not work for a db checkbox.
Ed Dressel
to