Announcement

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

    Problem with width calculating with FormItemIcon inline

    Hi,
    I've found a possible bug with calculating width with FormItemIcon present in SelectItem and ComboBoxItem.
    See screenshot:
    Click image for larger version

Name:	2018-08-22-154213_1920x1056_scrot.png
Views:	174
Size:	4.5 KB
ID:	254608

    Here is a code:
    Code:
    DynamicForm form = new DynamicForm();
            form.setWidth(600);
    
            TextItem item0 = new TextItem("item0");
            item0.setWidth(200);
    
            TextItem item1 = new TextItem("item1");
            item1.setWidth(200);
    
            FormItemIcon icon1 = new FormItemIcon();
            icon1.setSrc("box/silk/add.png");
            icon1.setInline(true);
    
            item1.setIcons(icon1);
    
            SelectItem item2 = new SelectItem("item2");
            item2.setWidth(200);
    
            FormItemIcon icon2 = new FormItemIcon();
            icon2.setSrc("box/silk/add.png");
            icon2.setInline(true);
    
            item2.setIcons(icon2);
    
            ComboBoxItem item3 = new ComboBoxItem("item3");
            item3.setWidth(200);
    
            FormItemIcon icon3 = new FormItemIcon();
            icon3.setSrc("box/silk/add.png");
            icon3.setInline(true);
    
            item3.setIcons(icon3);
    
            ComboBoxItem item4 = new ComboBoxItem("item4");
            item4.setWidth(200);
    
    
            form.setFields(
                    item0,
                    item1,
                    item2,
                    item3,
                    item4
            );
    As you can see all items should have 200px but SelectItem and ComboBoxItem with icon are larger.
    Even if they are larger editing space remains the same.

    By the way. Is there a way to show value icon in ComboBoxItem??
    You can do that in SelectItem but not in ComboBoxItem.
    I'm trying to make it work by FormItemIcon but maybe there is a simpler solution.
    Best regards
    Mariusz Goch


    #2
    This has already been fixed - please retest with today's build

    Comment


      #3
      Yes in version v12.0p_2018-08-22 (2018-08-22) it was fixed.
      Thanks

      Comment

      Working...
      X