Disable vaadin combobox dropdown - combobox

Hi in vaadin combobox i have only one item added which is in select by default.
So now there is no need in drop down option.
Is there any way to disable dropdown option in combobox?
Regards,
Vignesh

You can try setting the combobox to read-only or disabled if it only has one option. combobox.setReadOnly(true) will make it look like a label while combobox.setEnabled(false) will grey it out and disable the dropdown.

Well, what do you want to show instead? Just a Label? Then check if the container-size you add to the combobox is 1 and show a Label with the only "option" instead.

Related

Hide and show textbox when a particular option is selected in ext js

I have to include a checkbox in my code where when someone select on mail, I can give/show options for "To", "CC" and "BCC". When person doesn't select checkbox I want these textbox to be hidden in ext js.
In that case I'd recommend two way binding.
You use a viewmodel to bind the checkbox value and then use that value to bind a hidden state onto your "mail" textfields.
Here is a very broadly made working sencha fiddle example
Alternatively to #KaMun's solution, you can use a FieldSet with checkboxToggle set to true: https://docs.sencha.com/extjs/6.7.0/classic/Ext.form.FieldSet.html

Hide SmartGwt ComboboxItem if it has only one value to be selected

I am working with SmartGwt.
Is it possible to hide the combobox dropdown button if it has only one Item?
use the property like setShowPickerIcon(false), If we use this property, the SelectPicker Icon mean dropdown button will be invisible.
Add a change listener to it, if it has only one element, call setVisible(false).
Imho, it is not possible, but you can replace it with TextItem which has no dropdown button dynamically. Either by invoking setVisible(false/true) or by removing/adding it from/to the form.

CheckBox seletion on space bar press

we are using wpf, want to select templated checkbox of datagrid on space bar press when an item get selected in the datagrid. Kindly help me to achieve the same.
Any suggestion will highly appreciated. Thanks
set IsTabStop=True property of the checkbox and thus the checkbox will be selected and deselected on hitting spacebar.Hope this will help.

How can I programmatically set a tooltip on disabled buttons?

I´d like to know how can I programmatically set a tooltip on disabled buttons.
I think the ToolTipService.ShowOnDisabled attached property will do what you're looking for.

How i can turn off autocompletion in Extjs combobox?

When I selected some item in combobox and then I'm trying to select another item in same combobox, I can see only one item - those which is selected right now. I believe that happens because of autocompletion. Does anybody know how I can disable it or something. I need to see all values on each click, regardless if something was selected already or not.
Add triggerAction:'all' to your config.
better add disableKeyFilter:'true' to your combo box

Resources