Hi, i have a quite easy problem, which I am not able to find a solution.
I have a simple panel containing a Tab control with multiple Tabs. My aim would be to run a simple code in the "initialise" event of the main panel before running all the "initialise" events of every single Tab. However I am still try to find how.
An easy solution would be to create dynamically these Tab Object by means of the "AddSymbol" function, but it does not look so nice.
Is there any property inside the Tab control which could delay the execution of the initiailise scripts of his belonging Tabs? Somehting like Tab1.active=false and after the execution Tab1.active=true
Is there any other solution for this issue.
Thanks in advance to every one!
Control the execution of many initiliase scripts
- alaralum
- Posts:22
- Joined: Mon Jan 09, 2017 9:56 am
Control the execution of many initiliase scripts
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: Control the execution of many initiliase scripts
No, you can not tell the panel in the tabs to wait for the completion of the script in their 'container' panel.
* Yes, you could do addSymbol()
* An easier method would be to add the tabs to the tab-control
There are of course other ways to make a script wait
* You can use a dpConnect() to tell the tabs that they can start to do their work.
( just move the EventIntialize code to a callback)
* There's the interesting uiConnect function that I haven't yet used
* You can always use a mutex
* Or you could use a semaphoe
Hope this helps
share the fun
Frenk Mulder
* Yes, you could do addSymbol()
* An easier method would be to add the tabs to the tab-control
There are of course other ways to make a script wait
* You can use a dpConnect() to tell the tabs that they can start to do their work.
( just move the EventIntialize code to a callback)
* There's the interesting uiConnect function that I haven't yet used
* You can always use a mutex
* Or you could use a semaphoe
Hope this helps
share the fun
Frenk Mulder
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Control the execution of many initiliase scripts
You can assign the panels to the tabs with 'registerPanel' (or 'namedRegisterPanel') after you simple initialize code of the main panel.
You could even execute the initialize of the panel in the tab, when the tab is shown the first time by assigning the panel on the 'SelectionChanged' event of the tab control.
You could even execute the initialize of the panel in the tab, when the tab is shown the first time by assigning the panel on the 'SelectionChanged' event of the tab control.