I am using bokeh single radio button with single title . Initially it is inactive and when i click on radio button it changed to active but if I click again in active it is not changing to inactive state.
How i need to acheive this functionality??
Whether it's RadioGroup or RadioButtonGroup, neither of those two widgets is meant for a single element usage. Per design they are meant to be used as a group of elements. I advice you to use Toggle for your application. Other alternatives are CheckboxButtonGroup and CheckboxGroup. See Bokeh documentation for specific examples.
Related
I have a Qt Designer form (widget), that includes N radio buttons. And i want to see different options (QGroupBox, etc) depending on selected button in the same widget. What is the right way to solve this problem?
Of course, i can place all boxes in widget and change their visibility depending on selected radio button, but that is not perfect i'm sure.
It seems like QStackedWidget is what you're looking for.
Put your radio buttons into a QButtonGroup, then connect QButtonGroup::buttonClicked(int) to QStackedWidget::setCurrentIndex(int).
I'm using nsDialogs to create a custom page in the installer of my app, where users can decide between standard and portable installation.
For this, I create two radio button controls via NSD_CreateRadioButton so that users can decide between the two installation modes.
After receiving feedback from blind users, I'd like to add the possibility to navigate via keyboard between those two radio buttons. So far, pressing the Tab key navigates directly to the next button in the lower navigation bar and not to the . Arrow up / Arrow down have no effect.
How can I add this possibility for keyboard navigation using nsDialogs?
If you use the ${NSD_Create*} macros in nsDialogs.nsh then the WS_TABSTOP style will be set for button controls and you can Tab to them. However, the tab order is: the bottom buttons before the buttons in your dialog.
Assign a access key to allow a user to access a control directly. You do that by adding a ampersand (&) to the text label before a specific character:
${NSD_CreateRadioButton} 0 13u 100% 15u "Click &Me" ; Activate by pressing Alt+M
Pop $0
${NSD_CreateRadioButton} 0 30u 100% 15u "&Or Me"
Pop $0
The arrow keys should also work once one of the radio buttons have focus. The WS_GROUP style also plays a role in keyboard navigation if you have multiple groups of unrelated radio buttons.
I've found a solution to this problem, by experimenting with the suggestions #Anders provided.
In between the two calls to NSD_CreateRadioButton I had another call to NSD_CreateLabel which apparently mixed up the grouping between the two radio buttons.
When I create the radio buttons by two subsequent calls to NSD_CreateRadioButton and then add the describing labels, navigation via Arrow up and Arrow down works. If there is another call to NSD_Create* in between, it breaks the grouping.
I have a list control and i want the user to be able to select many items at a time. Thus I want it to act that if the control key is pressed while he is clicking. Eg if he clicks on a selected row it should become unselected and if he clicks on a unselected row it should become selected.
Do you have any idea how to do this?
Thanks,
Dennis
If you want to follow standard UI Precedent; then set allowMultipleSelection to true and teach your users to use the control and/or shift button to select multiple items.
If you want to select multiple items without having the using press the shift or control button you'll have to extend the List class. I did a sample a while ago using the DataGrid:
http://www.flextras.com/blog/index.cfm/2009/7/23/Flextras-Friday-Lunch--Episode-22--07032009--Auto-Select-DataGrid
http://www.flextras.com/labs/AutoSelectDataGrid/
http://www.flextras.com/labs/AutoSelectDataGrid/srcview/index.html
You can probably use the same technique with a List. But, I don't recommend this approach.
I need on my form ordinary widgets (e.g. buttons) do not react on mouse clicks but NOT to be disabled (it change look to grayed one -- not good).
I wonder is there some neat small hack for this?
You could stick in an event filter and filter out the mouse events before passing the remaining events on for processing, but I'm not sure that not giving the user a visual clue that certain elements are effectively disabled is such a good idea.
You could try using style sheets to control how the disabled mode of the buttons in your form get styled. Unfortunately I'm not sure exactly how to do that but you could have a look at the style sheet docs to get you started.
I'm trying to implement accessibility (keyboard only) ability on my site, but I'm having problems with Radio Button lists. When using radiobuttonlists, when initially, none of the radio buttons is selected, I am able to tab through every single value and select one upon hitting "enter". However, after a value is selected, I can only tab to the selected values, which presents a problem if I want to change the selected value.
From what I understand, radio buttons are grouped at the container controller level, thus when it is considered a group, only one can be selected at a time.
Any ideas on how to fix this issue?
Actually, this is not an issue at all. If a value is not selected, the browser will go through each value within the group. Once a value is selected, the browser will only jump to the chosen value within that group. Thus to change values within the group, the user is to use the keyboard arrows.
I believe you're correct about the RadioButtonList being one control (and therefore tabbing doesn't work). An alternative could be to create individual radio buttons and use the GroupName property to assign them all into one group. This should let you tab between them and still ensure they work in sync with each other.