Does Smart GWT support the concept of a split menu button? Specifically, a button with text/icon and a drop-down arrow that when its text is clicked fires a click handler, but when the drop-down arrow is clicked shows a menu? A use case would be a Search button that has a drop-down menu to configure exactly what is searched when it's clicked. See the attached image for what it looks like in ExtJS.
Announcement
Collapse
No announcement yet.
X
-
Got it working; see the attached image. Here's the code; I basically stripped out the ToolStripMenuButton class and the toolStrip.addToolStripMenuButton call and replaced it with IconMenuButton and addMember (a bit convoluted; I feel better about having to ask in the forums about this):
The UI definitely isn't as user-friendly as the ExtJS one though -- there's no bar separating the text from the drop-down arrow indicating two separate actions to the user, and the hover-over is a simple box line and not the normal gradient with rounded corners. A bit weird. Fortunately my users are all internal and I don't have to worry much about looks :pCode:IconMenuButton testButton = new IconMenuButton("Test", menu); testButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { SC.say("clicked"); } }); toolStrip.addMember(testButton);
Comment
Comment