Re: How to prevent dimming of controls that are not enabled

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



namewitheldbyrequest@xxxxxxxxx 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.getElementById('CheckBox1').disabled = 'disabled';

Damien


Damien wrote:
namewitheldbyrequest@xxxxxxxxx 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

.



Relevant Pages

  • Re: How to prevent dimming of controls that are not enabled
    ... Your point about using labels is a good one. ... the check boxes because when the user goes into Edit mode I can simply ... app I need more control of the appearance of the disabled check boxes. ... I do plan to visualize their disabled-ness somehow, ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: disable text box via combo box
    ... Sorry to butt in on your discussion about disabling controls from combo boxes ... and the Name of the combo box control. ... When an event occurs, if an event procedure is defined for the control, then ...
    (microsoft.public.access.forms)
  • Re: How to stop disabled text boxes being greyed out
    ... Not that most of us are using .Net, but John, if the text boxes look ... disabled when placed on a disabled frame, what about placing a PictureBox ON ... Will disabling the Frame ... and when I mark the control as ...
    (microsoft.public.vb.controls)
  • Re: Hide/Show controls & labels
    ... Yes, I agree with Andi... ... IF the labels are properly "attached" to the text ... you didn't respond to my point that if a control is made ... I would think that would make all the "disabling" code unnecessary... ...
    (microsoft.public.access.forms)
  • Re: VB6 hangs when I try to change Font property in IDE
    ... >I am running Visual Studio 6 SP5 on XP Pro, and when I try to use the font ... > property on labels, text boxes or any control, I get problems. ...
    (microsoft.public.vb.bugs)