I have created a containercontrol with one label, one text field and one button.
Then I added an array of this container controls to my window.
With a push button I’m creating a new instance of the container control and add it to the array.
In a method I’m rearranging the control and renaming it.
So far it’s working fine. I can now add these controls dynamically to my tabpanel.
Now I want to be able to delete some of the controls after I created it.
The button inside of the container control triggers a self.close.
Unfortunately I cannot trigger any methods outside of the container control because the method doesn’t exist when the control is created.
Now I want to trigger the event handler onClose when the container control is closed.
Here again it is not possible to refer to an outside method in the event handler.
So I have to add the event handler at the time of creation.
I know that I set the parameters in the method.
The question is if it’s possible to use a method which needs more than just the object type as parameter.
I’m gonna try some versions (with parameter, with only one parameter, no parameter).