Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Width of SelectItem when using setShowPickerIconOnFocus(true) and FormItemIcon together

    Hi Isomorphic,

    when I use "setShowPickerIconOnFocus(true)" and FormItemIcon on the same SelectItem, width of SelectItem is changing when "PickerIcon" disappears or appears.
    (using 12.0p/v12p_2018-08-09)

    Here is my test case:
    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.Version;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.IButton;
    import com.smartgwt.client.widgets.Window;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.FormItemIcon;
    import com.smartgwt.client.widgets.form.fields.SelectItem;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class BuiltInDS extends VLayout implements EntryPoint {
        private IButton recreateBtn;
    
        public void onModuleLoad() {
            KeyIdentifier debugKey = new KeyIdentifier();
            debugKey.setCtrlKey(true);
            debugKey.setKeyName("D");
    
            Page.registerKey(debugKey, new PageKeyHandler() {
                public void execute(String keyName) {
                    SC.showConsole();
                }
            });
    
            setWidth100();
            setHeight100();
    
            recreateBtn = new IButton("Recreate");
            recreateBtn.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    new MyWindow().show();
                }
            });
            addMember(recreateBtn);
            new MyWindow().show();
            draw();
        }
    
        private class MyWindow extends Window {
            public MyWindow() {
                setWidth(400);
                setHeight(300);
                setMembersMargin(0);
                setModalMaskOpacity(70);
                setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")");
                setShowMinimizeButton(false);
                setIsModal(true);
                setShowModalMask(true);
                centerInPage();
    
                DynamicForm df = new DynamicForm();
                df.setDataSource("animals");
    
                FormItemIcon fii = new FormItemIcon();
                fii.setSrc("");
                fii.setInline(true);
                fii.setTabIndex(-1);
    
                SelectItem si = new SelectItem("commonName");
                si.setShowPickerIconOnFocus(true);
                si.setIcons(fii);
    
                SelectItem si2 = new SelectItem("commonName");
                si2.setShowPickerIconOnFocus(true);
    
                df.setFields(si, si2);
    
                addItem(df);
            }
        }
    }
    Best regards
    Pavo

    #2
    Thanks for the clear test case. You should find that this is resolved in 12.0p and 12.1d builds as of 2018-08-22.

    Comment


      #3
      Hi Isomorphic,

      you're welcome. It's working now, thanks!

      Comment

      Working...
      X