I am assuming WhatToDo is another ComboBox.
PHP Code:
program New;
Var
WhatToDo, cbSpec: TComboBox;
procedure ChangeCBSpec(Sender: TObject);
begin
cbSpec.Clear;
case WhatToDo.Text of
'Tanning': begin
//What you want added to tanning goes here for refresh
end;
'fighting':begin
//What you want added to fighting goes here for refresh
end;
//Others here
end;
end;
procedure InitForm;
begin
//Rest of form stuff goes here
WhatToDo.OnChange := @ChangeCbSpec;
end;
begin
end.
Look at where I've added the Clear. Is that not what you want? Everytime you select a new WhatToDo item, the cbSpec will refresh and add the new options in