473,805 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to prevent dimming of controls that are not enabled

Is there a way to disable a web form control (change the Enabled
property to false) without the control being dimmed out when it's
rendered? I have quite a few of them on the form and they are hard to
read when they are disabled .
Thanks,

Bill
Cincinnati, OH USA

Sep 25 '06 #1
6 1574
na************* *****@gmail.com wrote:
Is there a way to disable a web form control (change the Enabled
property to false) without the control being dimmed out when it's
rendered? I have quite a few of them on the form and they are hard to
read when they are disabled .
Thanks,

Bill
Cincinnati, OH USA
Dimming of controls is a well understood and recognised visual cue to
the user that a control has been disabled. Are you proposing to give
the users no clue over which controls are enabled or disabled, until
they click on some and nothing happens?

Damien

Sep 25 '06 #2
Um, well ... yes.
I didn't know this was Microsoft.publi c.dotnet.frmewo rk.aspnet.abuse
Damien wrote:
na************* *****@gmail.com wrote:
Is there a way to disable a web form control (change the Enabled
property to false) without the control being dimmed out when it's
rendered? I have quite a few of them on the form and they are hard to
read when they are disabled .
Thanks,

Bill
Cincinnati, OH USA

Dimming of controls is a well understood and recognised visual cue to
the user that a control has been disabled. Are you proposing to give
the users no clue over which controls are enabled or disabled, until
they click on some and nothing happens?

Damien
Sep 25 '06 #3
I'm sorry.

I do agree with the importance of visual cues, but in this particular
app I need more control of the appearance of the disabled check boxes.
When they are dimmed they become very difficult to read against the
chosen background. I do plan to visualize their disabled-ness somehow,
but it has to be more readable. The customer will be looking at 4
columns of check boxes for many hours each day. They have to be
disabled yet still easy on the eyes.

na************* *****@gmail.com wrote:
Um, well ... yes.
I didn't know this was Microsoft.publi c.dotnet.frmewo rk.aspnet.abuse
Damien wrote:
na************* *****@gmail.com wrote:
Is there a way to disable a web form control (change the Enabled
property to false) without the control being dimmed out when it's
rendered? I have quite a few of them on the form and they are hard to
read when they are disabled .
>
>
Thanks,
>
Bill
Cincinnati, OH USA
Dimming of controls is a well understood and recognised visual cue to
the user that a control has been disabled. Are you proposing to give
the users no clue over which controls are enabled or disabled, until
they click on some and nothing happens?

Damien
Sep 26 '06 #4
na************* *****@gmail.com wrote:
I'm sorry.

I do agree with the importance of visual cues, but in this particular
app I need more control of the appearance of the disabled check boxes.
When they are dimmed they become very difficult to read against the
chosen background. I do plan to visualize their disabled-ness somehow,
but it has to be more readable. The customer will be looking at 4
columns of check boxes for many hours each day. They have to be
disabled yet still easy on the eyes.
Could you put the text for the control into a label control, rather
than using the text property of the checkbox, so that disabling the box
does not affect the text? It would still affect the actual box,
obviously (which would give some cue and continue to have all of the
desirable programmatic behaviours).

To be honest, I can't think of much else, off the top of my head, that
would work well - if you want the control disabled, the browser has to
know this (and at the end of the day, the browser controls the
appearance/behaviour of the control).

Damien

Sep 26 '06 #5
Your point about using labels is a good one. I was hoping to stick with
the check boxes because when the user goes into Edit mode I can simply
enable the Check Box List and then be ready to roll. If I can't make
the check boxes readable when disabled, then I have to create a
boatload of labels by hand and integrate them into the web form.

Also, the check box list is entirely data-driven and the content is
somewhat dynamic, so creating labels is problematic.

Damien wrote:
na************* *****@gmail.com wrote:
I'm sorry.

I do agree with the importance of visual cues, but in this particular
app I need more control of the appearance of the disabled check boxes.
When they are dimmed they become very difficult to read against the
chosen background. I do plan to visualize their disabled-ness somehow,
but it has to be more readable. The customer will be looking at 4
columns of check boxes for many hours each day. They have to be
disabled yet still easy on the eyes.

Could you put the text for the control into a label control, rather
than using the text property of the checkbox, so that disabling the box
does not affect the text? It would still affect the actual box,
obviously (which would give some cue and continue to have all of the
desirable programmatic behaviours).

To be honest, I can't think of much else, off the top of my head, that
would work well - if you want the control disabled, the browser has to
know this (and at the end of the day, the browser controls the
appearance/behaviour of the control).

Damien
Sep 27 '06 #6
na************* *****@gmail.com wrote:
Your point about using labels is a good one. I was hoping to stick with
the check boxes because when the user goes into Edit mode I can simply
enable the Check Box List and then be ready to roll. If I can't make
the check boxes readable when disabled, then I have to create a
boatload of labels by hand and integrate them into the web form.

Also, the check box list is entirely data-driven and the content is
somewhat dynamic, so creating labels is problematic.
If you have javascript enabled, and can keep track of all of this, you
can do your disabling on the client side, rather than the server side.
That will disable the checkbox itself, but not the associated text.

The javascript needed is just:
document.getEle mentById('Check Box1').disabled = 'disabled';

Damien

Damien wrote:
na************* *****@gmail.com wrote:
I'm sorry.
>
I do agree with the importance of visual cues, but in this particular
app I need more control of the appearance of the disabled check boxes.
When they are dimmed they become very difficult to read against the
chosen background. I do plan to visualize their disabled-ness somehow,
but it has to be more readable. The customer will be looking at 4
columns of check boxes for many hours each day. They have to be
disabled yet still easy on the eyes.
>
Could you put the text for the control into a label control, rather
than using the text property of the checkbox, so that disabling the box
does not affect the text? It would still affect the actual box,
obviously (which would give some cue and continue to have all of the
desirable programmatic behaviours).

To be honest, I can't think of much else, off the top of my head, that
would work well - if you want the control disabled, the browser has to
know this (and at the end of the day, the browser controls the
appearance/behaviour of the control).

Damien
Sep 27 '06 #7

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

Similar topics

4
23835
by: Adam Parkin | last post by:
Hi all, what I want to do is write a function to toggle the enabled field of all controls within a frame, but what I can't figure out is how does one iterate through all controls in a frame object? For example, if I wanted to iterate through all controls in a form, I'd write something like: Dim x For Each x In frmMyForm.Controls x.Enabled = Not x.Enabled
7
3569
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET) template. Briefly -------------------------------------------------------------------------------------------- I need to create dynamically some controls on the forms, and display these
7
9834
by: Saintor | last post by:
What I do now is I put a value in the tag property, and using the form_current event, I run through all controls properties until the ones with the required tag value are met. Sound OK in theory, but it is ... slow. I thought having a table with the name, type of controls and put my 'tag value' there. At the opening of the form, I would retrieve a recordset from the table, and perform a subroutine on the current event to lock/unlock...
3
3803
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76) and they were put onto the form in the numerical sequence. I have given the A's with B & C's on the same line a tag=1; B.tag=2, C,tag=2) I am trying to write 2 modules so that the following occurs (on Form_Current and 'A' Control_Before or...
4
1941
by: jesse.hartwick | last post by:
Hey group! I have a toolbar with a "DEVELOPER" menu. I have it so that it when the menu title is clicked, a pop-up form will appear if the user has not yet verified that he or she has developer privileges (this menu only appears when the user is set up as a developer, but i'm a bit paranoid on these matters i guess). My problem is that when the menu title is clicked, the form appears but so does the menu, and the menu has the focus,...
2
13278
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. I went ahead and wrote my own bit of code so I'm sharing it here for everyone. Even though it doesn't really disable the button by greying it out, it prevents the multiple submissions which it what I was attempting to prevent all along. ...
2
1627
by: RichG | last post by:
With the help of Cor Ligthert in a pryor post I was able to make this sub: Public Sub disableControls(ByVal frm As Form) 'this is to create a read only form that has active buttons Dim x As Long 'used for doing nothing For Each ctr As Control In frm.Controls If TypeOf ctr Is ComboBox Then ctr.Enabled = False ElseIf TypeOf ctr Is DateTimePicker Then
8
3594
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a picture box, lots of text boxes (for input).. you get the idea. All of a sudden everything on the form has disappeared, it looks like a blank, newly created form. I can still get to the properties of every item on the form using the drop-down box in...
2
3586
by: Otis Mukinfus | last post by:
Sorry for the long title. How does one prevent a tab key press from causing the focus to leave a page and move to the navigation bar and tool bars in a browser? I've set the TabIndex on all of the controls on the page, but as soon as I hit the tab key the focus jumps to the nav control in IE or Firefox. Thanks, Good luck with your project,
0
9718
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
10363
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...
1
10369
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,...
0
10109
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
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
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
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
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
3847
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.