ivoestg,
You already have one provided with the VCL: TSpeedButton.
To get it to act the way you want:
1. Drop a TSpeedButton on your form.
2. Set its GroupIndex property to a unique value.
3. Set AllowAllUp to True
4. Create a glyph containing four bitmaps of the same size. For example, if you want to use 16x16 images for the glyphs, create a bitmap that's 64 pixels wide and 16 high. See the Help topic for TSpeedButton.Glyph for the proper arrangement of the individual images.
5. Assign your bitmap to the button's Glyph property.
6. Verify that the NumGlyphs property is now set to four. If its not, then you may wish to review the construction of your bitmap. The IDE contains some logic that tries to determine the number of glyphs in the image. It works, but only when everything is properly defined.
You can determine the button's state at runtime by checking the Down property. For example:
Code:
if SpeedButton1.Down then
messageBeep( MB_ICONEXCLAMATION )
else
messageBeep( MB_OK );
Hope this helps...
-- Lance