Hi, i'm new to VB. I have a problem with de-selecting radio buttons in group box containers. I've tried to set focus to other objects under Sub New (initialization ) but it didn't work. The rdo buttons were still selected.
I've tried setting this: rdoName.Checked = False, as well, that didn't work. For some reason the top radio button in the group box is always selected!
I've also tried setting the rdoName.AutoChe ck = False. That works. The radio button at start up aren't selected but when i try to click on the rdo button, it won't let me.
So i need the radio button to be deselected in the group box and let me be able to click on it when i want to.
Someone help please.
4 13276
I'm not sure you can de-select all radio buttons in a group. Their whole purpose is to choose between mutually exclusive options. I think the standard technique is, where required, to include a "null option" in the group. For example, the first or last option might be "None".
Hm... now that I'm thinking about it, I seem to recall someone mentioning a property which allows you to specify whether all the radio buttons in a group can be unselected. I don't recall what the property is, but have a look through the properties on the "group box container" as well as the radio button(s).
(I can't check it, as I'm using VB6 which works differently.)
RadioButton1.Ch ecked = False
That seems to do the trick for me...
James
I had the same problem, which is actually how I ended up here...
Anyway, I solved it, in mine at least. RadioButton1's default setting for Checked is False, but for some reason when I debugged it, it came up checked anyway until I changed the property to True and then back to False again.
I have no idea why.
Please use CheckBox instead of radio/optionbox.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: John Mullen |
last post by:
I want to take the following HTLM and use javascript to turn on radio buttons if checkbox is checked, can I do this with javascript (maybe onClick or an array) or do i need a server side script ?
<li>ABACAVIR SULFATE</li>
<INPUT NAME="ingredient0" TYPE=checkbox VALUE="ABACAVIR SULFATE"><br>
<input name="ABACAVIR SULFATE AMOUNT" type="radio" value="EQ 300MG BASE">EQ 300MG BASE<br>
<input name="ABACAVIR SULFATE AMOUNT" type="radio" value="EQ...
|
by: elhombrebala |
last post by:
With this script I can force the user to select the checkbox befor
continuing, but now I have a menu with lots of radio unputs and I woul
like the user to select at least 2 of them; how can I check it?
<form name=formulario>
<INPUT type=checkbox name=casilla>
<INPUT type=button value="Salir"
onclick="Goingout()">
</form>
|
by: Orchid |
last post by:
I have 2 fields with Radio button Data Type, and both fields with more
than one options. On Field1, I want the user to select option1, then
Field2 is shown and able to select. If the user selects Option2, then
Field2 is not shown.
I can have the hidden-field working properly. However, after the user
selected Field1-Option1 and selected an Option on Field2, but cannot
deselect the option on Field2 if change mind on Field1 selection.
...
|
by: James P. |
last post by:
Help,
I need to display radio buttons on a form. The data is from SQL
table: each row in each table is displayed as a radio button. I have
multiple SQL tables so I understand I need to put them each in a
GroupBox. All the examples I saw from the books or from the web show
me how to add static radio buttons at design, or dynamically at run
time but with fixed radio buttons (like from an array).
I need to create radio buttons based...
|
by: deepagulati |
last post by:
Hi,
I need an urgent help from you.
When we dynamically genrate any list box (Select Box) it shows one
default value as selected.
Is there any way that we can deselect that value.
I tried with document.form_Name.ListBox_Name.options.selected =
| |
by: Jerim79 |
last post by:
My situation is that I have a form that asks the user for a number.
Next, I execute a while loop that displays a group of questions the
amount of times the customer entered. For instance, the loop looks
this:
while ($Number!=0){
<input type="radio" name="Age" value="20-30">20-30
<input type="radio name="Age" value="30-40">30-40
<input type="radio name"Age" value="40-50">40-50
$Number--;
|
by: jpmcafee |
last post by:
Hi Guys,
Iam new to vb2005 and programming and I could really use some help. I have finished my book on vb2005 and i cant find what I am looking for,
Essentially I want to create a form with 3 columns, down each of these colums will be about 20 radio buttons. I need to assign a value to each radio button such as( -4 thur +4) at the bottom of each column I need it to add them up for a final score. Any advice would be great! ...
|
by: dpazza |
last post by:
Hi,
I'm creating a quiz on using a form in VB 2005 express.
I have four sets of questions and answers (labels and radio buttons)
and I change between which set of questions is currently shown on the
form by changing the visible state of the radio buttons and labels
utilising back and next buttons.
E.g. Next button makes current radio buttons and labels invisible and
|
by: alanb |
last post by:
Hi,
hope someone can help, I need to be able to keep a running total of radio buttons selected, as a user goes through a set of 16 questions, devided in to 4 catorgories, then on "submit" have the total number showen on screen, or on "submit" loop through the selected radio buttons and get the total.
What I have at the moment will loop through all the buttons and just add all the totals, how do I get this code to add together the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |