?
Solved

Kill focus rectangle on RadioButton

Posted on 2005-04-07
4
Medium Priority
?
567 Views
Last Modified: 2010-04-05
Exactly what I say in the title. I don't wish to show a dotted rectangle on RadioButton caption. How to stop it ?
0
Comment
Question by:ginsonic
  • 2
4 Comments
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 13728577
How about setting the focus to another component on the form

SomeComponent.SetFocus;

If you select a radio button manually, you will see the rectangle as you change focus
0
 
LVL 11

Expert Comment

by:calinutz
ID: 13730386
MikeLittleWood meant something like this

procedure TForm1.RadioButton1Enter(Sender: TObject);
begin
RadioButton1.Checked:=not RadioButton1.Checked;
Button1.SetFocus;
end;
0
 
LVL 26

Accepted Solution

by:
Eddie Shipman earned 1000 total points
ID: 13730861
Well, Since you can not do it without writing an OwnerDrawn button and setting
it's itemState to ODS_NOFOCUSRECT, I'd suggest just placing a label next to it
and remove the caption. You can set the Label's FocusControl property to the
RadioButton and any accelerator's will work correctly, yet you won't get a focus
rectangle.
0
 
LVL 26

Expert Comment

by:Eddie Shipman
ID: 13730868
I meant remove the radiobutton's caption, not the label's, if you were confused.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question