Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a button appear as if it is pressed?

Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button look "pressed"? Imagine this button is an on/off switch. ToolStripButton has the Checked property, but the regular Button does not.

like image 455
Douglas Tosi Avatar asked Aug 07 '08 16:08

Douglas Tosi


People also ask

How to add button click effect?

Simple and easy way to set View click effect.public AlphaAnimation clickAnimation() { return new AlphaAnimation(1F, 0.4F); // Change "0.4F" as per your recruitment. }

How to give click effect to button in CSS?

We can use CSS transform property to add a pressed effect on the button when it is active. CSS transform property allows us to scale, rotate, move and skew an element.

How to make button pressed in JavaScript?

In order to make it a button, change type="hidden" to type="button" . To make it invisible to the user, you could use inline styles like this: style="display: none;" .


1 Answers

One method you can used to obtain this option is by placing a "CheckBox" object and changing its "Appearance" from "Normal" to "Button" this will give you the same functionality that I believe you are looking for.

like image 51
Tanerax Avatar answered Sep 28 '22 01:09

Tanerax