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
6
votes
3 answers

How do I make my custom checkbox accessible?

I'm trying to implement more accessibility to the website I'm working on. I have a custom checkbox inside a button, followed by a list of checkboxes. When I'm using a screenreader, I expect the screen reader to tell me whenever a checkbox is…
yuggmeister
  • 87
  • 2
  • 8
6
votes
3 answers

C# Check If Text File Has Content

I am building a C# WPF Browser App (my C# skills are quite rusty). I have a button that I want to have change color depending on if a text document has anything in it. IE: Color is Green if there is any text in it, or Red if it is empty. Can someone…
The Woo
  • 17,809
  • 26
  • 57
  • 71
6
votes
2 answers

change button image in android

I want to change the image of a button in my code. I found this can be done in xml: please check this link but the image will not stay on after I released the button. I want to click the button and the button change to a new image. Can this be done?
user195678
  • 535
  • 4
  • 13
  • 27
6
votes
5 answers

ASP.net button onserverclick only works when onclick isn't defined

protected void btnNext_Click(object sender, EventArgs e) { btnNext.InnerHtml = "CLICK"; } This works fine, but when I add an…
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
6
votes
2 answers

Make tkinter buttons the same size

I want to make all the tkinter buttons the same size regardless of text. Is it possible to stretch other buttons to match each other or set a specific size? As I am having difficulty finding how to do so in the documentation. Currently the buttons…
somerandomguy95
  • 161
  • 1
  • 3
  • 13
6
votes
3 answers

Button_to in Ruby on Rails bad route

I'm trying to use the button_to rails helper. I wrote the following code: <%= button_to 'Edit Item', edit_item_path(@item), :class => 'mark-button' %> and got the following error message No route matches "/items/1/edit" But when I refresh the…
Nachshon Schwartz
  • 15,289
  • 20
  • 59
  • 98
6
votes
3 answers

Android - Set Clicked focus on Button

I am having 4 buttons in my layout, now whenever i click any button, after the click event, button should be highlighed showing that it was clicked last. For making such thing, i have tried the following: code: btn1.setOnClickListener(new…
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
6
votes
7 answers

Android. How do I keep a button displayed as PRESSED until the action created by that button is finished?

I have button_focused, button_pressed, and button_normal images. When I press the button, the button_pressed image is displayed and the action related to the button pressing begins. When I quit pressing the button, the action continues but the…
user527405
  • 89
  • 1
  • 1
  • 4
6
votes
2 answers

Heart shaped button in android

I have this application that I am working on and the user can mark some items as a favorite. I want to use a heart shaped button for this functionality instead of the casual one is it possible?
Toka A. Amin
  • 156
  • 1
  • 2
  • 16
6
votes
1 answer

javafx - Bind button according to boolean value

Here, I want to disable and enable button according to the value of the boolean. boolean result=(txtItem.getText().isEmpty() && txtQty.getText().isEmpty()); btnOrder.disableProperty().bind(xxxxx); what should I enter there??
KNB
  • 97
  • 3
  • 9
6
votes
1 answer

How to handle state of multiple buttons with react?

I have a bootstrap grid where each grid item is populated from an array of objects but after each grid item I would like to have a vote button. How could I achieve this with maintaining state on each button separately, ie when button 1 is clicked…
Chris O
  • 712
  • 2
  • 9
  • 20
6
votes
3 answers

Change color of a Flex 4 spark Button

Is there an easy way to change the background color of a Flex 4 spark Button without messing with skins? UPDATE: ok, figured it out, simply set the chromeColor attribute of the Button mxml.
at.
  • 50,922
  • 104
  • 292
  • 461
6
votes
1 answer

How can I change tabs in react-bootstrap using a button?

How can I change a tab by a click of a button using React/React-Bootstrap? For example, to click on a button and it let me go to the tab selected. Code below: import React, {Component} from 'react' import { Tabs, Tab } from…
Phoenix
  • 437
  • 3
  • 6
  • 15
6
votes
1 answer

Event handling dynamic created buttons in Vue.js v-for loop

I have a v-for loop where a button is created for each iteration. I'm trying to make a toggle handler where clicking the button will toggle the color of the button. But since the buttons are dynamically created, all of their colors are changing ....…
Ananda Chowdhury
  • 239
  • 2
  • 5
  • 8
6
votes
6 answers

Windows OS Button Style CSS

Can anyone guess what CSS styling I should apply to a button to guess this exact look. Note: I realize this is the default look for for unstyled buttons on Windows and that I don't have to apply any CSS to get this style, but on Mac and Linux it's…
silow
  • 4,256
  • 3
  • 21
  • 24
1 2 3
99
100