Alex A. Renoire
Alex A. Renoire

Reputation: 361

Styling a TextField GXT 3

I want to set the text-size property of a gxt TextField. I start from writing MyTextFieldAppearance. Here is everything ok. Next i need to modify my.gwt.xml file, and here I get into trouble.

There is no TextFieldAppearance in class com.sencha.gxt.widget.core.client.form.TextField, the only TextFieldAppearance is in class TextInputCell.TextFieldAppearance, but if I write

<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>

Nothing happens.

Upvotes: 1

Views: 1818

Answers (1)

Alex A. Renoire
Alex A. Renoire

Reputation: 361

There is a bug in gxt, in method

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

you need to add line

  StyleInjectorHelper.ensureInjected(this.style, true);

to the end

Upvotes: 1

Related Questions