Announcement

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

    Alignment issue with CheckboxItem

    I have a CheckboxItem in the 2nd column of a DynamicForm with TitleOrientation.LEFT. I have ComboBoxItems in the same column above. The labels align around the colon but the Checkbox appears a couple of pixels to the right. It seems to use the left edge of the focus grid (slightly bigger than checkbox) of the checkbox for alignment...

    Code:
            tableItem = new ComboBoxItem("tableName");
            tableItem.setTitle("Table Name");
    
            ComboBoxItem userGroupItem = new ComboBoxItem("userGroup");
            userGroupItem.setTitle("User Group");
    
            CheckboxItem toggleScheduler = new CheckboxItem();
            // will initially return null if not set to false
            toggleScheduler.setValue(false);
            // otherwise focus area will fill container
            toggleScheduler.setWidth(1);
            toggleScheduler.setTitleOrientation(TitleOrientation.LEFT);
            toggleScheduler.setTitle("Schedule");
            // SmartGWT bug means TitleOrientation.LEFT does not work
            // fixed in SmartGwt subversion code 24 may 2009
            // http://forums.smartclient.com/showthread.php?t=4766
            toggleScheduler.setAttribute("labelAsTitle", true);
    the screenshot shows the issue...
    Attached Files
    Last edited by boardtc; 22 Apr 2009, 06:21.

    #2
    That's CSS padding or cell padding. See the various *style setters on FormItem.

    Comment


      #3
      Ok. I see CellStyle,TitleStyle,ShowErrorStyle,HintStyle & HoverStyle. I don't see the default listed in the help for getCellStyle(). Looking though skin_style.css, it's not obvious which is used for the default.

      Trying
      Code:
              myComboboxitem.setCellStyle("padding: 0px; padding-left:0px; padding-right:0px; padding-bottom:0px;");
      does not have an effect. Am I getting warmer?

      Comment

      Working...
      X