Checkbox within ContextMenu closes menu. Any way to keep it open?
I've implemented a ContextMenu where the items have checkboxes enabled via setCheckable(true). What seems strange to me is that the context menu closes as soon as I click the checkbox. These are开发者_运维问答 not set up as radio buttons (implying single selection) and since the nature of checkboxes are to allow multiple selection, I'm unsure of how to prevent the context menu from closes when the checkbox is clicked.
Am I overlooking some property? Thanks in advance...
The behavior of a context menu is to handle a click and close.
While there may be a way to suppress that behavior I am not aware of it. Perhaps you could generate a dialog on longClick of multiple choice items instead.
精彩评论