choiceIsSelected
function choiceIsSeected(choiceID: integer; itemIndex:integer):boolean;
The function returns true if the item (identified by 'itemIndex') is selected in choice group (identified by 'choiceID').
var choiceGroupID: integer;
NY, LA: integer;
begin
showForm;
choiceGroupID := formAddChoice('Where do you live?', CF_EXCLUSIVE);
NY := choiceAppendStringImage(choiceGroupID, 'New York', loadImage('/NY.png'));
LA := choiceAppendStringImage(choiceGroupID, 'Los Angeles', loadImage('/LA.png'));
if choiceIsSelected(choiceGroupID, NY) then
formAddString('New York');
else
formAddString('Los Angeles');
end.
See also: formAddChoice