Re: Can a disabled checkbox have a color other than gray?

Discussion in 'ASP .Net' started by Leo Duran, Aug 6, 2003.

  1. Leo Duran

    Leo Duran Guest

    Bummer, I was hoping there was a ReadOnly property for the checkbox.

    However, if you are just wanting to display the checked status or not, you
    could always use a picture that indicates a checked state, and one that
    indicates an unchecked state and just show whichever is appropriate. This
    would be much easier then trying to make the checkbox control emulate this
    behavior.

    To make the checkbox behave the way you are thinking and trapping the event
    you would involve writing client side script.

    "Mike Lerch"
    <> wrote in message
    news:...
    > I have a databound webform that is suitable for printing by the
    > client. However, I want to keep them from "editing" the data
    > ("editing" because it's not getting posted back to the database or
    > anything). My thought was to set enabled = "false" on all the
    > checkboxes and the handful of checkboxes on the form. However, this
    > turns everything gray. Using CSS or strong-naming styles doesn't seem
    > to help. In fact, it seems that it might be a function of IE: when
    > IEsees disabled="disabled" in the HTML, it seems that it might be IE
    > that is changing the color to gray, even though I want it to remain
    > black.
    >
    > So, any thoughts? My goal is to keep users from changing the values
    > of checkboxes and textboxes in a web form while having control over
    > the styles (essentially making them look like they're enabled).
    >
    > The only thing I came up with off the bat is making some kind of event
    > that traps when the user tries to change something. I can do that,
    > but it seems like there should be an easier way!
    >
    > Lerch
     
    Leo Duran, Aug 6, 2003
    #1
    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. -
    Replies:
    9
    Views:
    458
    Roland
    Mar 25, 2005
  2. madder10

    gray a disabled menu item???

    madder10, Oct 5, 2003, in forum: C++
    Replies:
    3
    Views:
    2,633
    Greg Schmidt
    Oct 6, 2003
  3. Chris Lincoln
    Replies:
    1
    Views:
    569
    Alexey Smirnov
    Jul 2, 2007
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    429
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    1
    Views:
    272
    marss
    Feb 14, 2007
Loading...

Share This Page