SDG Button Widget

<< Back to the SDG Toolkit page

SDG Button Widget

An SDG Button that can be configured to respond to multiple mice in two different ways (see UseLock property)

Unzip all files (executables plus dependancies) into a single folder



  • generated when the user(s) release the button after pressing it
  • returns the ID of the mouse that released the button



  • if false, allows simultaneous use of the button where More than one can press it, but the click isn't generated until all release
  • if true, the button is 'locked' by the first person who presses and ultimately releases it; the click is generated when that person, and only that person, releases it.


  • like the normal Text property of a button, but I had to use the word Caption instead of Text as I couldn't figure out how to make an overloaded property appear in the Visual Studio Designer

Basic button properties

  • should work mostly as expected, e.g., Font, BackColor, ForeColor, BackgroundImage, Enabled, etc.

Known limitations

  • unlike a normal button, moving the cursor off of the button does not release it (to be fixed at some point)
  • double buffering isn't correctly implemented, so there may be some flickering during redraws when the BackgroundImage is used.
  • the event handler for the Click event should be implemented to fit the 'e.' pattern
  • Rob Diaz's SDGWidget has more sophisticated versions of how widgets can be done.

This SDG example is developed by: Saul Greenberg, Winter 2006. Included with permission.