Page 1 of 1
Script on grouped object doesn't work ?
Posted: Mon Apr 29, 2013 8:13 am
by Nicolas2121
Hello,
Can I execute a script event on a grouped object ?
I have a button and a rectangle which are grouped. When I want to execute a "MouseDown" event script of this object, it doesn't work, but if I execute this script on "MouseDown" event of the rectangle or the button, it works. Why ?
Re: Script on grouped object doesn't work ?
Posted: Mon Apr 29, 2013 8:37 am
by mark.monroe
Which version of iX are you using? The latest version 2.0.463 seems to work as expected. I know that in Version 1.31 of iX there was a bug in the groups that may cause what you are seeing.
Re: Script on grouped object doesn't work ?
Posted: Mon Apr 29, 2013 8:56 am
by Nicolas2121
I have the version 2.0.463, so I don't understand.
Have you an idea ?
Re: Script on grouped object doesn't work ?
Posted: Mon Apr 29, 2013 9:30 am
by mark.monroe
You shouldn't use actions and scripts at the same time. I would create some new objects and group them.
Putting the script code in the MouseDown event of the individual object will not work most likely.
Code: Select all
void Group1_MouseDown(System.Object sender, System.Windows.Forms.MouseEventArgs e)
{
Globals.Screen2.Show();
}
Re: Script on grouped object doesn't work ?
Posted: Mon Apr 29, 2013 10:29 am
by Nicolas2121
I don't use actions and scripts at the same time.
I did the test with a script on "MouseDown" event of the grouped object, and after, the same script on "MouseDown" event of the rectangle of this grouped object.
I have noticed that the script worked only on parts of sub objects of the grouped object. But I need do run the script on the one that is grouped.