Change button text at runtime (part 2) / Update a button

Hi everyone,

If I change a button’s text by means of elements.myButton.text = ‘some text’; then the changed text should show up as soon as the entire call stack has finished - or so I believed. But it doesn’t; the text only shows up after manually refreshing the page. It doesn’t matter if I force a roundtrip to the ui by means of plugins.ngclientutils.getUserAgent(); or application.updateUI(500);. I have tried these lines of code both directly after the above line and as the last line in the entire call stack, to no avail. What am I overlooking here?

Actually, by manually refreshing the page I noticed that the appearance of the button changed as well: from a grey disabled state to a colored enabled state, which is exactly what I want. So along the way that has been taken care of; what I only seem to need is some code that performs a refresh on the button. I can call this code as soon as the text is changed, and then my troubles are over. How can I establish this?

Thank you, kind regards,
Coos

Coos, it might be worth clarifying what version of Servoy you are using and what type of client is running, to help the forum respond ;-)

Hi rafig,

Yes, of course, I should have done that.
I’m using Servoy version 8.2.1.3105, and it is an ng client.

Kind regards,
Coos