Travis Webb
Travis Webb

Reputation: 15018

How can I have Multi-line Form Labels in Sencha Touch?

If I set a sufficiently long label for any kind of form element, or the title of a FieldSet, it just grows horizontally forever if I set labelAlign to right. How can I force these to wrap to the next line instead of creating horizontal scrollbars?

Upvotes: 1

Views: 8377

Answers (2)

Swar
Swar

Reputation: 5503

I think using the labelWidth property for a field will give you the desired result.

Upvotes: -2

rdougan
rdougan

Reputation: 7225

You will need to override the default CSS which forbids wrapping (white-space: nowrap). This should do the job:

.x-form-fieldset-title,
.x-form-label {
    white-space: normal;
}

Example:

Example

Upvotes: 8

Related Questions