Solved

About Option Button

Posted on 2002-06-06
9
157 Views
Last Modified: 2010-05-02
I have some Option Buttons in the program
And I want to choose one of them not only cliking on this
button ,but also cliking on the text which is near this
button.
How can I do this ?
Thanks.
0
Comment
Question by:Vadimka
9 Comments
 
LVL 4

Expert Comment

by:gencross
ID: 7060076
You should be able to use the label click event and fire the click event of the option within the label click event
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 7060078
If I am not mistaken, if you have a LABEL control associated with each option (radio) button, and make the TabIndex of the Option button ONE MORE than the TabIndex of the associated label control, then, since you cannot TAB to a Label( and you cannot "select" a Label), when you click on the Label, the associated option button is selected. Is That what you want to have happen?

Arthur Wood
0
 
LVL 5

Expert Comment

by:rpai
ID: 7060082
That happens by default i.e clicking the text adjacent to the option button, the option button gets enabled(selected)
Does it not?
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
LVL 4

Expert Comment

by:gencross
ID: 7060083
Code:

Sub Label1_Click

Call Option1_Click

End Sub
0
 
LVL 4

Expert Comment

by:gencross
ID: 7060092
forgot...

You would set the caption of the option button to nothing and use the label in it's place.

There may be a better way to do this, but this way will work.

Hope this helps.
0
 

Author Comment

by:Vadimka
ID: 7060156
yes,exactly
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 7060291
Just click the text and it should select the option as rpai has suggested.
0
 
LVL 2

Expert Comment

by:ventond
ID: 7060588
The option button has a built in label. Just set the .Caption propertie and do away with your other label.
0
 
LVL 2

Accepted Solution

by:
priya_pbk earned 50 total points
ID: 7061178
yes, clicking the caption of the option button, itself selects the option button.

Therefore no code no NOTHING.!!

-priya
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

828 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