How to prevent dimming of controls that are not enabled

Discussion in 'ASP .Net' started by namewitheldbyrequest@gmail.com, Sep 25, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Damien Guest

    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
     
    Damien, Sep 25, 2006
    #2
    1. Advertising

  3. Guest

    Um, well ... yes.


    I didn't know this was Microsoft.public.dotnet.frmework.aspnet.abuse


    Damien wrote:
    > 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, 2006
    #3
  4. Guest

    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.

    wrote:
    > Um, well ... yes.
    >
    >
    > I didn't know this was Microsoft.public.dotnet.frmework.aspnet.abuse
    >
    >
    > Damien wrote:
    > > 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, 2006
    #4
  5. Damien Guest

    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
     
    Damien, Sep 26, 2006
    #5
  6. Guest

    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:
    > 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, 2006
    #6
  7. Damien Guest

    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:
    > > 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
     
    Damien, Sep 27, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gabor
    Replies:
    3
    Views:
    659
    Jacob Yang [MSFT]
    Aug 26, 2003
  2. Paul Aspinall
    Replies:
    1
    Views:
    389
    Terry Burns
    Feb 5, 2006
  3. TheKeith
    Replies:
    3
    Views:
    888
    TheKeith
    Dec 13, 2003
  4. Just Me

    Page Dimming

    Just Me, Dec 16, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    347
    Scott Lloyd
    Dec 18, 2007
  5. Arpan De

    Dimming A Variable More Than Once

    Arpan De, Aug 25, 2003, in forum: ASP General
    Replies:
    2
    Views:
    160
    Jon Mundsack
    Aug 25, 2003
Loading...

Share This Page