Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Button Disabling

Button Disabling

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    madhusri
    wrote on last edited by
    #1

    Hi I have a problem with disabling a button. When i need to disable a button then i do not want the DrawImageDisabled function to be called. Instead i just need it to be replaced with the image i provide. How can this be handled? Please help me out in this. Thanks and Regards Madhu

    J D 2 Replies Last reply
    0
    • M madhusri

      Hi I have a problem with disabling a button. When i need to disable a button then i do not want the DrawImageDisabled function to be called. Instead i just need it to be replaced with the image i provide. How can this be handled? Please help me out in this. Thanks and Regards Madhu

      J Offline
      J Offline
      James Gupta
      wrote on last edited by
      #2

      Maybe, when the event is triggered to disable it, replace the image with the one you want, and then put an if() clause in the OnClick event to say if the image is X (or a bool you have attatched to it) then do this, otherwise break. Regards James

      1 Reply Last reply
      0
      • M madhusri

        Hi I have a problem with disabling a button. When i need to disable a button then i do not want the DrawImageDisabled function to be called. Instead i just need it to be replaced with the image i provide. How can this be handled? Please help me out in this. Thanks and Regards Madhu

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Create your own button control, inheriting from the original Button class. Override the drawing code and supply your own to draw the correct image you want. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups