cancel
Showing results for 
Search instead for 
Did you mean: 

Wrapping of Text in the Table UIElement

Former Member
0 Kudos

Hi

Is it possible to wrap the text in the header of a Table UIElement.Whenever a column heading is created it keeps extending on one single line. Any suggestions.

ravi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ravi,

the only available UI element for a table column header (see IWDTableColumn) is a caption (see IWDCaption). Forget about TextViews or Labels, you simply can't use them here.

A caption does not support wrapping or line breaks yet, so there's no possibility to get multiline headers.

The table column will always be wide enough to display the header text in one single line.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Hi Ravi,

True, The only element youcan use is a Caption.

If you want to wrap the data on it there is no direct option but you could try binding the caption to a context and manually adding a '\n' where you want to split it to another line.

I have tried this in many places and it has worked.

Regards.

Balaji

Former Member
0 Kudos

I doubt this works, in any case, it is not a feature.

In the current IWDTableColumn implementation, the associated header is of type IWDCaption.

This means, a table column header may contain a single line of text together with an icon that may be placed before or after the text.

Armin

Former Member
0 Kudos

Hii Balaji,

I tried to bind the caption with the context but then adding '\n' doesnt work.Can u write down the caption where u wrapped the text using '\n' ? i need it asap.Thank You.

Regards

Ishita

Former Member
0 Kudos

Please give a try with one of the following options..

A similar post is also available at

<u>Option 1</u>

1.Set the layout property of the UI element container to be GridLayout or MatrixLayout.

2.Enable the "wrapping" property of Label or TextView to "true"

3.Set the "width" property of the UI Element's(label/TV) Layout data to <integer>px [eg: 100px]

3.Build and Deploy

<u>Option 2</u>

This option is only applicable for Labels. But for any Layout.

1.Set the "width" property of the UI Element(label/TV) to <integer>px [eg: 100px]

2.Enable the "wrapping" property of Label or TextView to "true"

3.Build and Deploy

Thanks and Regards,

Sam Mathew