SmartClient Version: v9.1p_2014-06-20/Pro Deployment (built 2014-06-20)
FF 24.8.1 ESR,
When overriding the css class of IconMenuButton and adding ellipsis to it, the title of the IconMenuButton is cut off and the dots are shown (OK) but the dropdown that houses the menu items also disappears. See images + code
And Css:
I know ellipsis is not yet supported standard in smartGWT, but is there something I can do?
Kind Regards
Sela
FF 24.8.1 ESR,
When overriding the css class of IconMenuButton and adding ellipsis to it, the title of the IconMenuButton is cut off and the dots are shown (OK) but the dropdown that houses the menu items also disappears. See images + code
Code:
package com.example.myproject.client.misc; import be.sofico.silkroad.client.util.SilkConstants; import com.example.myproject.client.doc.HowToWriteTests; import com.example.myproject.client.doc.PanelFactory; import com.example.myproject.client.doc.TestCasePanel; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.layout.SectionStack; import com.smartgwt.client.widgets.layout.SectionStackSection; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.menu.IconMenuButton; import com.smartgwt.client.widgets.menu.Menu; import com.smartgwt.client.widgets.menu.MenuItem; public class EllipsisOnIconMenuButton extends TestCasePanel{ private static final String DESCRIPTION = "A guide how to use this test application."; public static class Factory implements PanelFactory { private String id; public Canvas create() { EllipsisOnIconMenuButton panel = new EllipsisOnIconMenuButton(); id = panel.getID(); return panel; } public String getID() { return id; } public String getDescription() { return DESCRIPTION; } public String getURL() { return null; } public String[] getIssues() { return null; } public String getBadBuild() { return null; } public String getFixedBuild() { return null; } } public Canvas getViewPanel() { VLayout layout = new VLayout(); final SectionStack stack = new SectionStack(); stack.setWidth(500); final Menu menu = new Menu(); MenuItem item1 = new MenuItem("Item 1"); item1.setAttribute("canDismiss", false); MenuItem item2 = new MenuItem("Item 2"); item2.setAttribute("canDismiss", true); menu.setData(item1, item2); IconMenuButton menuButton = new IconMenuButton("Menu Button with ellipsis in css", menu); menuButton.setShowMenuIconOver(true); // menuButton.setBaseStyle("test"); final SectionStackSection section = new SectionStackSection("Header"); section.setControls(menuButton); section.setExpanded(true); stack.setSections(section); layout.setMembers(menuButton); return layout; } @Override public String getIntro() { return DESCRIPTION; } }
Code:
.iconButton, .iconButtonOver, .iconButtonDown, .iconButtonFocused, .iconButtonFocusedOver, .iconButtonFocusedDown, .iconButtonSelected, .iconButtonSelectedFocused, .iconButtonSelectedDown, .iconButtonSelectedFocusedDown, .iconButtonSelectedOver, .iconButtonSelectedFocusedOver, .iconButtonDisabled, .iconButtonSelectedDisabled { overflow: hidden; text-overflow: ellipsis; white-space: no-wrap; max-width: 110px; display: block; }
Kind Regards
Sela
Comment