【问题标题】:centering the contents of an column in GWT Bootstrap cell table在 GWT Bootstrap 单元格表中居中列的内容
【发布时间】:2013-04-24 03:17:04
【问题描述】:

我有一个单元格表,列数据是我想要将这些复选框对齐到该列的中心的复选框

我试过column.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); 并在 css 中使用 text-align:middle 。但它似乎不起作用。请帮助

【问题讨论】:

    标签: gwt uibinder gwt-bootstrap


    【解决方案1】:
        Column<Person, Boolean> checkColumn = new Column<Person, Boolean>(
            new CheckboxCell(true, false)) {
          @Override
          public Boolean getValue(Person object) {
            // check box function
          }
        };
        checkColumn.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
    

    对我来说很好。

    由于您没有提供太多代码,我只能做出几个假设:

    • 检查您的单元格表格 CSS [如果您使用自定义的] 没有过度写入对齐方式
    • 仔细检查您是否对齐右列 [发生]
    • 如果您使用的是 UiBinder,请检查以确保您只在 java 类或 xml 中设置对齐方式

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-20
      • 2014-06-28
      • 1970-01-01
      • 1970-01-01
      • 2016-05-11
      • 1970-01-01
      相关资源
      最近更新 更多