Questions tagged [buttongroup]

buttongroup refers to bootstrap button groups. A button group is a series of buttons grouped together either horizontally or vertically by a parent element with the role group and the class btn-group.

refers to bootstrap button groups. A button group is a series of buttons grouped together either horizontally or vertically by a parent element with role="group" and class="btn-group".

Button groups is supported in all versions of bootstrap. Example :

<div class="btn-group" role="group" aria-label="Basic example">
  <button type="button" class="btn btn-secondary">Left</button>
  <button type="button" class="btn btn-secondary">Middle</button>
  <button type="button" class="btn btn-secondary">Right</button>
</div>

Recent documentation :
http://getbootstrap.com/components/#btn-groups (bootstrap 3)
http://v4-alpha.getbootstrap.com/components/button-group/ (bootstrap 4)

205 questions
1
vote
5 answers

Which radio button is selected in a button group

What can I do to get which radiobutton is selected on a buttongroup without doing this: if (jRadioButton1.isSelected()) { //... } if (jRadioButton2.isSelected()) { //... } if (jRadioButton3.isSelected()) { //... } if…
user225269
  • 10,743
  • 69
  • 174
  • 251
1
vote
1 answer

Clear Selection of RadioButtons

My application: user wants the object to move left with a particular speed - he/she chooses one radiobutton from moveToLeft ButtonGroup. But he/she changes his/her mind and wants the object to move right - he/she chooses one radiobutton from…
beechy
  • 101
  • 8
1
vote
1 answer

Java - using a IsSelected function in radioButtons and JPanel

I have to set a "quiz" in Java, using JPanel and JRadioButton. My code starts with reading a text from a file and putting it on a panel, with radio buttons, button groups and panel. So far, so good. However my problem starts when I have to collect…
Assaf
  • 1,112
  • 4
  • 14
  • 35
1
vote
2 answers

Bootstrap 3 is unable to unmark the justified dropdown button group for the inactive options

With Bootstrap 3.3.7, I am trying to have a justified navigation dropdown button group, to mark correctly, after selection. I am having the problem of both menu options being marked, in the dropdown button, when one after another options being…
xam
  • 452
  • 2
  • 7
  • 15
1
vote
1 answer

Why does autofocus leave a dotted line around the button?

I have a button group and I'm trying to set the first button in it to be active when the page loads. I'm not using .active because then when I press the other buttons the active stays on that first button and I would then need to use JS to change…
chuckd
  • 13,460
  • 29
  • 152
  • 331
1
vote
1 answer

Selected RadioButton on ButtonGroup doesn't show into TextArea in Java

I'm a student and right now I have a project for my college. this is short of my code. private void buttonProccesActionPerformed(java.awt.event.ActionEvent evt) { String gender =…
1
vote
2 answers

Justified .btn-group with Bootstrap v4-alpha-5

The question asked here addresses justified button group in < alpha-3. It doesn't work in alpha-5 (and I think in alpha-4 also). From what I gather from the issues list, it has been removed and won't be back. I'm using SCSS and and potentially…
Michael
  • 4,282
  • 9
  • 55
  • 89
1
vote
2 answers

AngularJS Simple click counter not working

I'm trying to build a counter functionality. I'm using AngularJS with Bootstrap button group and I'm not sure where the conflict is. Below is my code. Can someone please help?
1
vote
2 answers

Inlining a dropdown button-group using bootstrap

My problem fiddle is here: https://jsfiddle.net/h3mb08ph/ I'd like to move the "plus" dropdown button-group to the left of the edit button. I first moved the div to the correct place, like so: https://jsfiddle.net/h3mb08ph/1/ Next, I tried to…
Jedi
  • 3,088
  • 2
  • 28
  • 47
1
vote
1 answer

Align btn-group to other form-control input fields

I'm using Bootstrap to create an input field for a web application. I'm using btn-group to create a segmented control of 3 selection (for users to select their sex). Unfortunately, I can't get it to behave how I would like. I can't get the button…
Alexander
  • 59,041
  • 12
  • 98
  • 151
1
vote
1 answer

Problems with React-Bootstrap button

This is what i'm trying to do https://react-bootstrap.github.io/components.html#btn-groups but when I click on one of the buttons I want another function to be called
1
vote
1 answer
1
vote
2 answers

get the name of the selected radio button from button group

I want to return selected radio button name from button group in java : ButtonGroup bg = new ButtonGroup(); bg.add(radiobutton1); bg.add(radiobutton2); bg.add(radiobutton3);
Moath Wafeeq
  • 45
  • 1
  • 3
  • 12
1
vote
2 answers

Get the focus in a ButtonGroup of JRadioButtons to go to the currently selected item instead of first

I have some JRadioButtons in a ButtonGroup. These are all inside of a container, and there are other items on the group. Whenever I tab to the button group, the focus always goes to the first item in the group. However, I would much rather it go…
Pixelstix
  • 702
  • 6
  • 21
1
vote
2 answers

Button group overflowing on small viewport

I want to create a group button in a element that'll behave the same on both small and large screens. This is what I currently have.
Abrar Jahin
  • 13,970
  • 24
  • 112
  • 161