Greyed out controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ryan

    #1

    Greyed out controls

    Is there any way to disable controls without causing them to be greyed out?
    Such as text boxes, list boxes, etc.

    Thanks.
    Ryan


  • james

    #2
    Re: Greyed out controls


    "Ryan" <Tyveil@newsgro ups.nospamwrote in message
    news:eLT45Kn1GH A.1268@TK2MSFTN GP02.phx.gbl...
    Is there any way to disable controls without causing them to be greyed
    out? Such as text boxes, list boxes, etc.
    >
    There may be, by overriding stuff or using the API calls etc, but generally
    it's a bad idea as if the user sees something that should work but doesn't,
    they tend to think it's broken...


    Comment

    • Marina Levit [MVP]

      #3
      Re: Greyed out controls

      Not with the standard .NET winforms controls. You would have to manually
      handle events, and not allow the user to enter text, and so on.

      Other vendors may provide controls that allow you to override the colors of
      the control even while it is disabled.

      "Ryan" <Tyveil@newsgro ups.nospamwrote in message
      news:eLT45Kn1GH A.1268@TK2MSFTN GP02.phx.gbl...
      Is there any way to disable controls without causing them to be greyed
      out? Such as text boxes, list boxes, etc.
      >
      Thanks.
      Ryan
      >

      Comment

      • Ryan

        #4
        Re: Greyed out controls

        Well what I have is an application with built in Emailing capabilities for
        notifying users. I have given users the ability to view previously sent
        Emails, similar to Outlooks Sent Items. If they double-click on an email, I
        have it open in the same form that is used to create and send mail, with all
        the functionality disabled (for sending items, selecting recipients, etc).
        Outlook does something very similar if you open any email in your Sent
        Items - even though you can see the text body (not greyed out) you cannot
        edit. I want a similar look/feel. Greying out text boxes with a large
        amount of text is difficult to read and doesn't look good. I assumed this
        would be a common property (like enabled). I believe I used to do it in
        Access using the locked property?

        Ryan

        "james" <james@com.comw rote in message
        news:4506c274$0 $27307$db0fefd9 @news.zen.co.uk ...
        >
        "Ryan" <Tyveil@newsgro ups.nospamwrote in message
        news:eLT45Kn1GH A.1268@TK2MSFTN GP02.phx.gbl...
        >Is there any way to disable controls without causing them to be greyed
        >out? Such as text boxes, list boxes, etc.
        >>
        >
        There may be, by overriding stuff or using the API calls etc, but
        generally it's a bad idea as if the user sees something that should work
        but doesn't, they tend to think it's broken...
        >
        >

        Comment

        • Marina Levit [MVP]

          #5
          Re: Greyed out controls

          There is also a readonly property for textboxes, which you can try.

          "Ryan" <Tyveil@newsgro ups.nospamwrote in message
          news:OSTT$jn1GH A.324@TK2MSFTNG P05.phx.gbl...
          Well what I have is an application with built in Emailing capabilities for
          notifying users. I have given users the ability to view previously sent
          Emails, similar to Outlooks Sent Items. If they double-click on an email,
          I have it open in the same form that is used to create and send mail, with
          all the functionality disabled (for sending items, selecting recipients,
          etc). Outlook does something very similar if you open any email in your
          Sent Items - even though you can see the text body (not greyed out) you
          cannot edit. I want a similar look/feel. Greying out text boxes with a
          large amount of text is difficult to read and doesn't look good. I
          assumed this would be a common property (like enabled). I believe I used
          to do it in Access using the locked property?
          >
          Ryan
          >
          "james" <james@com.comw rote in message
          news:4506c274$0 $27307$db0fefd9 @news.zen.co.uk ...
          >>
          >"Ryan" <Tyveil@newsgro ups.nospamwrote in message
          >news:eLT45Kn1G HA.1268@TK2MSFT NGP02.phx.gbl.. .
          >>Is there any way to disable controls without causing them to be greyed
          >>out? Such as text boxes, list boxes, etc.
          >>>
          >>
          >There may be, by overriding stuff or using the API calls etc, but
          >generally it's a bad idea as if the user sees something that should work
          >but doesn't, they tend to think it's broken...
          >>
          >>
          >
          >

          Comment

          • Ryan

            #6
            Re: Greyed out controls

            Excellent, this greys out the control but not the text, which makes it far
            more readable.
            Thanks!

            "Marina Levit [MVP]" <someone@nospam .comwrote in message
            news:uj2rIpn1GH A.328@TK2MSFTNG P06.phx.gbl...
            There is also a readonly property for textboxes, which you can try.
            >
            "Ryan" <Tyveil@newsgro ups.nospamwrote in message
            news:OSTT$jn1GH A.324@TK2MSFTNG P05.phx.gbl...
            >Well what I have is an application with built in Emailing capabilities
            >for notifying users. I have given users the ability to view previously
            >sent Emails, similar to Outlooks Sent Items. If they double-click on an
            >email, I have it open in the same form that is used to create and send
            >mail, with all the functionality disabled (for sending items, selecting
            >recipients, etc). Outlook does something very similar if you open any
            >email in your Sent Items - even though you can see the text body (not
            >greyed out) you cannot edit. I want a similar look/feel. Greying out
            >text boxes with a large amount of text is difficult to read and doesn't
            >look good. I assumed this would be a common property (like enabled). I
            >believe I used to do it in Access using the locked property?
            >>
            >Ryan
            >>
            >"james" <james@com.comw rote in message
            >news:4506c274$ 0$27307$db0fefd 9@news.zen.co.u k...
            >>>
            >>"Ryan" <Tyveil@newsgro ups.nospamwrote in message
            >>news:eLT45Kn1 GHA.1268@TK2MSF TNGP02.phx.gbl. ..
            >>>Is there any way to disable controls without causing them to be greyed
            >>>out? Such as text boxes, list boxes, etc.
            >>>>
            >>>
            >>There may be, by overriding stuff or using the API calls etc, but
            >>generally it's a bad idea as if the user sees something that should work
            >>but doesn't, they tend to think it's broken...
            >>>
            >>>
            >>
            >>
            >
            >

            Comment

            • Eric Moreau

              #7
              Re: Greyed out controls

              See an article I wrote in July 2005 from http://emoreau.s2i.com/

              --


              HTH

              Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
              Conseiller Principal / Senior Consultant
              S2i web inc. (www.s2i.com)


              "Ryan" <Tyveil@newsgro ups.nospamwrote in message
              news:eLT45Kn1GH A.1268@TK2MSFTN GP02.phx.gbl...
              Is there any way to disable controls without causing them to be greyed
              out? Such as text boxes, list boxes, etc.
              >
              Thanks.
              Ryan
              >

              Comment

              Working...