Solved

About Option Button

Posted on 2002-06-06
9
155 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
 
LVL 4

Expert Comment

by:gencross
ID: 7060083
Code:

Sub Label1_Click

Call Option1_Click

End Sub
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help in WHSCRIPT 9 47
Write data from SQL to CSV file - position 1 52
vb6 programatically bring window to front 8 63
Hide vba in gp 7 83
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now