I'm trying to do a sort of temporary form autocomplete on mouse over of a combobox item. My combobox has a remote store and I would that on item hover the other fields of the form are compiled with the other information from combo store while the mouse is on an item. There isn't a mouseover event for comboboxes items so how can I do it?
You can attach a mouseover listener to the div element that is wrapping the combobox like so:
myCombo.bodyEl.on('mouseover', function(e, t, eOpts) {
//Do something
});
Related
Hello I am trying to figure out if we can have a checkboxlist with child radio buttons?
Something like this
Is it possible in jstree? Does anyone have an example? When the checkbox is checked then we should show the children radiolist and if it is unchecked it should be hidden.
And also the data can be an AJAX call to get the data from the db.
We use ag-grid and I need to control the way context menu items are being generated based on mouse and keyboard events. In this case I need to add an optional context menu item if alt+right click are pressed (rather than just right click). Simply binding event listeners on our end does not help because the context menu items are being bound before the event listener is being fired so I can't check if the user pressed them.
Any advise will be appreciated.
As per documentation Configuring the Context Menu, you can provide context menu items using gridOptions.getContextMenuItems function. Here you can find if Shift or Ctrl is pressed or not.
if(this.event.altKey === true) {
result.push({name: 'Alt key is pressed', disabled: true});
}
if(this.event.shiftKey === true) {
result.push({name: 'Shift key is pressed', disabled: true});
}
Have a look at this plunk I've created: Context Menu Example
Based on the key you press while doing mouse right click, one item is getting added to the context menu.
How to create a JavaFx ComboBox and hide the dropdown arrow, it should show the list only when mouse is clicked on combobox. Note- we must not use CSS
I want to have different popup menu on Items and SubItems and NO Popup menu on empty area of a TTreeView is that possible ?
I want something like the pictures bellow
There are two ways you can do that.
Create 2 separate TPopupMenu objects with the desired menu items, do not assign either one of them to the TreeView's PopupMenu property, and then use the TreeView's OnContextMenu event to call the Popup() method of whichever TPopupMenu you need based on which node the user is clicking on.
Create 1 TPopupMenu object and put both menu items in it, and assign it to the TreeView's PopupMenu property, then use the TPopupMenu.OnPopup event to show/hide the menu items based on which node the user is clicking on.
In either case, you can use the TTreeView.GetNodeAt() method to determine which node is located at the coordinates of a mouse click, if any.
how to get focus on listbox items through keyboard and selected the item in textbox by pressing enter
You can give a ListBox focus by calling setFocus(true) on it. The keyboard/enter behavior you mention is provided automatically.