473,804 Members | 3,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Checkboxes affecting other controls

I have a main form containing 2 checkboxes, ChckIBCCP and
ChckOtherReferr al

The respective checkboxes when checked cause the SpecialEffect
Property to make ALL the textboxes to appear Shadowed.

The specific Textboxes and specific Combo Boxes required to appear
Shadowed
are ALMOST the same in number regardless which checkbox is checked.

However, there is one Textbox on the main form that must appear Flat
when ChckIBCCP is
checked, but must appear Shadowed when ChckOtherReferr al is checked.

AND However, there are three Textboxes and two Combo Boxes on the main
form that must appear Flat when ChckOtherReferr al is checked, but must
appear Shadowed when ChckIBCCP is checked.

1)How how do I cause individual textboxes to appear Flat?

2)How do I cause the Textboxes and Combo Boxes to highlight upon
checking the respective checkbox?

Thanks,

John

Here is my code:
Private Sub ChckIBCCP_Click ()
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "Shadow1" And ChckIBCCP = True _
And ctl.ControlType = 109 Then
ctl.SpecialEffe ct = 4
ElseIf ctl.Tag <"Shadow1" And ctl.ControlType _
= acTextBox Then
ctl.SpecialEffe ct = 1
End If
Next
End Sub
Private Sub ChckOtherReferr al_Click()
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag = "Shadow1" And ChckOtherReferr al = True _
And ctl.ControlType = 109 Then
ctl.SpecialEffe ct = 4
ElseIf ctl.Tag <"Shadow1" And ctl.ControlType _
= acTextBox Then
ctl.SpecialEffe ct = 1
End If
Next
End Sub
Jun 27 '08 #1
0 1218

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
4601
by: Steven | last post by:
I create the checkboxes dynamically on my webform (aspx). after I create them, when I check any of the checkboxes, nothing happens. Here is my code ... ArrayList LayerNameList1 = LayerNameList; CheckBox checkBoxArray; int BoxCount = 0; HtmlTableRow newRow; HtmlTableCell FieldCell;
4
2408
by: epigram | last post by:
I've got a page that has a Panel object that I am dynamically adding CheckBox controls to. The number of CheckBox controls and the name of each control is based on a database query. I would like to know how I can query for all the CheckBox controls on the page during postback and check their checked attribute without using the name of each checkbox. I want to do this in a generic way so that I don't have to requery the db or save the...
1
1889
by: zoneal | last post by:
Hello there, Currently I am working with the project which needs dynamically generated checkboxes and i have generated dynamic checkboxes but i am facing problem with getting the value of selected checkboxes. Problem is described below to understand easily, so please let me know if you come to know the
8
42188
by: Tim | last post by:
On my form I have 10 checkboxes named chkbox1,chkbox2,....chkbox10. I would have like to set it up as an array control like in VB6 where I could have chkbox(1),chkbox(2) but I think .net you have to have specific names for each control. All 10 of the boxes are in a groupbox. What I'm trying to do is when I hit a button it will loop through all the checkboxes to see which ones are checked and add that checkbox name to a string. Something...
1
3781
by: Patrick | last post by:
Hello - I am designing a form that only allows 2 checkboxes to be checked out of a series of checkboxes. However, checkedchanged and checkstatechanged both act when the box is clicked on. I want only 2 boxes clicked, and if another is selected nothing happens until one is unselected. I tried keeping track of how many were checked then turning off all the checkboxes, but that didn't seem right or allow changes. Also, if this could be done...
5
8405
by: Mike Fellows | last post by:
I have created some checkboxes within a panel using the code below Dim NewCheckbox As New CheckBox Me.Panel2.Controls.Add(NewCheckbox) NewCheckbox.Location = New Point(XLocation, YLocation) NewCheckbox.AutoSize = True NewCheckbox.Text = DS1.Tables(0).Rows(counter1)(0) NewCheckbox.Name = "Checkbox" & counter1 + 1
1
2580
by: RLN | last post by:
Re: Access 2003 I found a method here in the newsgroup that works for clearing checkboxes, but don't understand a particular line of code and how it works. Here is the code: 1. Dim ctrl As Control 2. For Each ctrl In Me.Controls 3. 'uncheck all of the checkboxes...
5
11282
by: masterej | last post by:
Developers, Is there any way to disable all checkboxes on a form? I have a form with 160 checkboxes and I want to be able to disable all of them. Is there a way I can do something like this: for (int i = 0; i < 160; i++) { string checkbox = "checkBox" + i.toString(); (Cast)checkbox.enabled = false;
1
2248
by: zufie | last post by:
I have a main form containing 2 checkboxes. The respective checkboxes when checked cause the SepcialEffect Property to make all the textboxes to appear Shadowed. 1)Although the Textboxes and Combo Boxes required to appear Shadowed are almost the same regardless of the checkbox that is checked how do I cause individual textboxes to appear Flat? 2)How do I cause the Textboxes and Combo Boxes to highlight upon
0
9706
marktang
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...
0
9584
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,...
0
10583
Oralloy
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...
0
10337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10082
tracyyun
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...
0
5525
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...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.