I had a similar problem a few years ago.  Someone on this list gave me the
solution.  You need to change the focus as well.

TRadioButton(RadioGroup1.Controls[RadioGroup1.ItemIndex]).SetFocus;

I don't know why Delphi doesn't do this for us!

Cheers,
Ross.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: Monday, 5 May 2008 10:49 p.m.
To: [email protected]
Subject: Focus problem with RadioGroup

I am using D6 prof. under XP (all updates for both) 

If I from inside my app. change ItemIndex, overruling a just manually 
set currently wrong selection, the 'Black Dot' does move to the new 
selection.

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.

I have so far worked around that by moving the focus to somewhere 
safe, after my 'in-software change' (and before issuing the warning 
message!!), but is that the only way ?

Is there a way to move the dotted text marking too ?

_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to