Questions tagged [button]

Buttons are simple elements in graphical user interfaces that take mouse clicks or finger taps (on touch devices) as input.

In computing, a button (sometimes known as a command button or push button) is a user interface element that provides the user a simple way to trigger an event, like executing a query on a search engine or to interact with dialog boxes to confirm an action.

When asking questions specific to a particular framework or language, it's best to use the appropriate tag instead (if it's available). For example, the HTML <button> element should be tagged with , iOS buttons should be tagged with , and Java Swing buttons should be tagged with .

40417 questions
252
votes
11 answers

Android - border for button

How do I add a border to a button? Is it possible to do this without resorting to use of images?
jeffreyveon
  • 13,400
  • 18
  • 79
  • 129
247
votes
9 answers

How to wrap text of HTML button with fixed width?

I just noticed that if you give an HTML button a fixed width, the text inside the button is never wrapped. I've tried it with word-wrap, but that cuts of the word even though there are spaces available to wrap on. How can I make the text of an HTML…
Peter
  • 14,221
  • 15
  • 70
  • 110
245
votes
10 answers

Display a tooltip over a button using Windows Forms

How can I display a tooltip over a button using Windows Forms?
Anonymous Cow
244
votes
13 answers

How to Set Opacity (Alpha) for View in Android

I have a button as in the following: In my onCreate() event, I am calling Button01…
ncakmak
  • 4,014
  • 5
  • 20
  • 17
237
votes
6 answers

Disable form auto submit on button click

I have a HTML form where I use several buttons. The problem is that no matter which button I click, the form will get submitted even if the button is not of type "submit". e.g. Buttons like :, result in form…
Paris
  • 6,323
  • 7
  • 31
  • 49
233
votes
24 answers

How to hide close button in WPF window?

I'm writing a modal dialog in WPF. How do I set a WPF window to not have a close button? I'd still like for its WindowState to have a normal title bar. I found ResizeMode, WindowState, and WindowStyle, but none of those properties allow me to hide…
Michael Hedgpeth
  • 7,732
  • 10
  • 47
  • 66
229
votes
16 answers

How to remove button shadow (android)

I want to remove the shadow from the button to make it seem more flat. I have this right now: But I want this:
sousheel
  • 2,419
  • 2
  • 13
  • 8
221
votes
12 answers

Cannot lower case button text in android studio

I have a trivial question that has been bothering me for a while. I tried to google this but no one seems to have the same problem as me or doesn't see it as an issue. When I make a button in activity_my.xml under layout
216
votes
16 answers

How to remove outline border from input button

When I click somewhere else the border disappears, I tried to use onfocus: none, but that didn't help. How to make this ugly button border disappear when I click on it? input[type=button] { width: 120px; height: 60px; margin-left: 35px; …
Cindy Turlington
  • 2,456
  • 3
  • 15
  • 20
210
votes
7 answers

Remove the complete styling of an HTML button/submit

Is there a way of completely removing the styling of a button in Internet Explorer? I use a css sprite for my button, and everything looks ok. But when I click the button, it moves to the top a little, it makes it look out of shape. Is there a css…
Saif Bechan
  • 16,551
  • 23
  • 83
  • 125
201
votes
10 answers

How to add a spinner icon to button when it's in the Loading state?

Twitter Bootstrap's buttons have a nice Loading... state available. The thing is that it just shows a message like Loading... passed through the data-loading-text attribute like this:
198
votes
6 answers

How can I build multiple submit buttons django form?

I have form with one input for email and two submit buttons to subscribe and unsubscribe from newsletter:
{{ form_newsletter }}
veena
  • 2,023
  • 2
  • 13
  • 6
193
votes
15 answers

Bootstrap control with multiple "data-toggle"

Is there a way to assign more than one event to a bootstrap control via "data-toggle"? For example, let's say I want a button that has a "tooltip" and a "button" toggle assigned to it. Tried data-toggle="tooltip button", but only the tooltip…
I Stand With Russia
  • 6,254
  • 8
  • 39
  • 67
191
votes
12 answers

Embed image in a

I'm trying to display a png image on a
Amit Hagin
  • 3,136
  • 6
  • 26
  • 36
186
votes
13 answers

How to call a PHP function on the click of a button

I have created a page called functioncalling.php that contains two buttons, Submit and Insert. I want to test which function is executed when a button gets clicked. I want the output to appear on the same page. So, I created two functions, one for…
Razor
  • 2,581
  • 6
  • 21
  • 27