cancel
Showing results for 
Search instead for 
Did you mean: 

how to change a property programmatically

Former Member
0 Kudos

Hello,

How can I change a property during runtime? Like, change the label of a button, or change the header text of a table.

regards,

arnold

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arnold

1)Create Value Attributes according to the type of the property and bind those to the corresponding property

2) now at runtime use wdContext.current<node>Element.set<property_name>("test");

Regards

Chaitanya.A

Former Member
0 Kudos

Hello, thanks for the reply.

Awarded points in the first to response that has worked for me. Thanks again.

Answers (2)

Answers (2)

Former Member
0 Kudos

You can bind the property "label" of a button to a context element for changing the it during runtime

Former Member
0 Kudos

Hi Arnold,

You need to get an instance of the UI element at runtime. You can get this only in WDDoModifyView

IWDLabel lab = (IWDLabel)view.getElement(<labelID>);

lab.set<property>(<value>);

Warm Regards,

Murtuza