This does it --

var
  LWinCtrl: TWinControl;
begin
  RadioGroup1.ItemIndex := 3;
  if RadioGroup1.Controls[RadioGroup1.ItemIndex] is TWinControl then
  begin
    LWinCtrl := TWinControl(RadioGroup1.Controls[RadioGroup1.ItemIndex]);
    Windows.SetFocus(LWinCtrl.Handle);
  end;


> However, the dotted square marking around the item text remains with
> the previous (wrong) item.
> This means, that if I move focus to another form/application  and go
> back (just returning to the form itself), the radiogroup returns to its
> previous (wrong) state.
_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to