Solved

About Option Button

Posted on 2002-06-06
9
158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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