【问题标题】:Styling a TextField GXT 3样式化 TextField GXT 3
【发布时间】:2012-07-04 09:07:10
【问题描述】:

我想设置 gxt TextField 的 text-size 属性。 我从编写 MyTextFieldAppearance 开始。这里一切正常。 接下来我需要修改my.gwt.xml文件,这里就麻烦了。

com.sencha.gxt.widget.core.client.form.TextField 类中没有 TextFieldAppearance, 唯一的 TextFieldAppearance 在 TextInputCell.TextFieldAppearance 类中,但如果我写了

<replace-with
  class="ru.nicetu.radient.kef.client.appearance.KefValueBaseFieldAppearance">
  <when-type-is
    class="com.sencha.gxt.cell.core.client.form.TextInputCell.TextFieldAppearance" />
</replace-with>

什么都没有发生。

【问题讨论】:

    标签: java css gxt appearance


    【解决方案1】:

    gxt 中有一个 bug,在方法中

      public TextFieldDefaultAppearance(TextFieldResources resources) {
        super(resources);
        this.resources = resources;
        this.style = this.resources.css();
      }
    

    你需要添加一行

      StyleInjectorHelper.ensureInjected(this.style, true);
    

    到最后

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-03-16
      • 1970-01-01
      • 1970-01-01
      • 2018-04-29
      • 1970-01-01
      • 1970-01-01
      • 2023-03-22
      相关资源
      最近更新 更多