cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change TextBox ReadOnly property on Runtime

athounaojamamar
Visitor

How to change TextBox ReadOnly property on Runtime

Hi,

I have been trying to changed the ReadOnly Property of TextBox​, and does not find a solution yet.

Is anyone done this earlier or any suggestions?

Regards

Amarjit Thouna

6 REPLIES 6

Re: How to change TextBox ReadOnly property on Runtime

Amarjit, the ReadOnly property is not a bindable property, so you won't be able to enable/ disable at runtime.

Re: How to change TextBox ReadOnly property on Runtime

By usecase is when mashup is loaded, it will display the textbox in readonly mode.

When a user click a button like "Update" it will make the TextBox Editable.

So is this usecase possible with the inbuilt ThingWorx features?

Or do I have to develop a custom feature (Widget) for this?

Re: How to change TextBox ReadOnly property on Runtime

Amarjit, an alternative way would be to hide the textbox. The 'Visible' property is bindable, so when the user clicks the 'update' button like you mentioned, that could trigger the visible property and make the textbox visible. If you want to use ReadOnly, that would indeed be a custom feature.

Re: How to change TextBox ReadOnly property on Runtime

Hidding is not suitable in my usecase because the use will decide whether to update or not base on the value.

Custom widget might only be the solution.

Thanks for your suggestions.

Re: How to change TextBox ReadOnly property on Runtime

There's a workaround with 2 textboxes, one readonly and one editable which are on the same place in the Composer. Click on Update button will hide the readonly textbox and show the editable textbox while enabling and disabling Visible properties.

Re: How to change TextBox ReadOnly property on Runtime

This works (although it is a bad design), I would like to consider this as a work around.

With Thanks and Regards

Amarjit Thouna

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.