cancel
Showing results for 
Search instead for 
Did you mean: 

Change Text of a Caption Object on runtime

0 Kudos

Hi!

I would like to change the Caption Text of a Tab on runtime. How can I do that?

Bye Markus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Markus

Assign the text property to a context attribute of type string.

you can change the text property in the init method of the view or in any method you create in that view as follows.

wdContext.currentContextElement.set<Context attributename>(<caption text to be displayed>)

Regards

NagaKishore V

Answers (1)

Answers (1)

Former Member
0 Kudos

1. The simplest approach: bind <i>text</i> property of TabHeader to context attribute and manipulate attribute value;

2. More complex: in wdDoModifyView do the following:


final IWDCaption tabHeader = (IWDCaption)view.getElement("<tabHeaderID>"); 
tabHeader.setText("Whatever you want");

Regards,

VS

Former Member
0 Kudos

Addition to Valery's correct answers:

The second approach is not recommended for manipulating UI element properties because it may lead to view layout updates.

Armin