Issue with dynamic button labels on IX 2.40 SP1

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
pmanuel
Posts: 8
Joined: Fri Aug 30, 2013 10:49 am

Issue with dynamic button labels on IX 2.40 SP1

Post by pmanuel »

Hello dear Sirs.

Recently I changed from IX 2.20 to the new IX 2.40 SP1 because I'm now programming the X2 Base 10'' HMI.
I used to load buttons labels on screens using the following code:

void scrnHelp_Opened(System.Object sender, System.EventArgs e)
{
this.btIn0.Text="WAY1";
this.btIn1.Text="WAY2";
this.btIn2.Text="WAY3";
this.btIn3.Text="WAY4";
this.btIn4.Text="WAY5";

}

On IX 2.20 the screen opens with the buttons labels updated. On IX 2.40 SP1 the screen opens with the buttons with the labels defined on the "object properties". The code inside scrnHelp_Opened is executed but the screen is not updated.
Is there a reason/solutions for this?
Thanks

pmanuel
Posts: 8
Joined: Fri Aug 30, 2013 10:49 am

Re: Issue with dynamic button labels on IX 2.40 SP1

Post by pmanuel »

Hello to all.

I think I discovered the reason:

It seems that on version 2.40 of IX the text defined on the "properties window" is refreshed after (or at the end) of the "opened event". I removed the text value associated on the "properties window" and now the text

this.btIn0.Text="WAY1";

is now visible on the button.

Best regards

gsavary
Posts: 5
Joined: Fri Feb 24, 2017 7:06 am

Re: Issue with dynamic button labels on IX 2.40 SP1

Post by gsavary »

I have the same issue but with Text label objects.
If I remove the default text from the property windows. The script is executed correctly (the default text is not overwriting my script text).
The drawback is that during design, the text label object are not visible!

Is there a way to avoid the default text to overwrite the script text or the script text to be executed in an event coming after the default text ?

Post Reply