Announcement

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

    CheckboxItem Title orientation not changing.

    Hello,

    i have created a simple dynamic form with a checkboxitem on it. I need the title to be on the left side (the default) so I explicitly call the setTitleOrientation on both the form and the item to left (you can try with any option really). Although some space is left black the title orientation does not change. this is the below result and the code

    Code:
    form = new DynamicForm();
    form.setNumCols(2);
    
            CheckboxItem sponsoredUserItem = new CheckboxItem("sponsoredUserField",
                    "Sponsored User");
            sponsoredUserItem.setTitleOrientation(TitleOrientation.LEFT);
    
            DateItem dashboardUserItem = new DateItem("dashboardUserField",
                    "Dashboard Account Anniversary");
            dashboardUserItem.setCanEdit(false);
            dashboardUserItem.setDateFormatter(DateDisplayFormat.TOJAPANSHORTDATE);
            dashboardUserItem.setUseTextField(true);
            dashboardUserItem.setWrapTitle(false);
    
            ButtonItem refreshBtn = new ButtonItem("refreshBtn", "Refresh");
            refreshBtn.setStartRow(true);
            refreshBtn.setEndRow(false);
    
            ButtonItem updateBtn = new ButtonItem("updateBtn", "Update");
            updateBtn.setStartRow(false);
            updateBtn.setEndRow(true);
    
            form.setFields(dashboardUserItem,
                    sponsoredUserItem,
                    refreshBtn,
                    updateBtn);
            form.setTitleOrientation(TitleOrientation.LEFT);
    Click image for larger version

Name:	image_10117.png
Views:	137
Size:	10.2 KB
ID:	239119

    #2
    See checkboxItem.titleAsLabel: checkboxItem is showTitle:false by default, so your settings will do nothing since the title is not being shown. With titleAsLabel:false, the title will appear on the left as for other items, without the need for extra settings.

    Note that the default of titleAsLabel:true is a different appearance from titleOrientation:"right"; titleOrientation:"right" would place the title *in the next column*, not in the same column as the checkable box.

    Comment

    Working...
    X