Sowiedu
07-04-2011, 10:54 PM
Hi there!
I'm currently writing some script which uses DotNet to creaty a tabbed Dialog.
Here's te Code:
testTabs_Rollouts = #(
#("Source",#(rigRollout)),
#("Projectile",#(typeRollout, propertiesRollout, physicsRollout, impactEventRollout)),
#("Target",#(targetRollout)),
#("Animation",#(animationRollout))
)
rollout mainTabs "EasyShooter 0.1a"
(
dotNetControl dn_tabs "System.Windows.Forms.TabControl" height:20 width:420 align:#center
subRollout theSubRollout width:420 height:560 align:#center
on dn_tabs Selected itm do
(
if LastSubRollout != (itm.TabPageIndex+1) do --do not update if the same tab clicked twice
(
for subroll in testTabs_Rollouts[LastSubRollout][2] do
removeSubRollout theSubRollout subroll
for subroll in testTabs_Rollouts[LastSubRollout = itm.TabPageIndex+1][2] do
addSubRollout theSubRollout subroll
)
)--end mainTabs clicked
on mainTabs open do
(
for aTab in testTabs_Rollouts do
(
dn_tabs.TabPages.add aTab[1]
)
for subroll in testTabs_Rollouts[1][2] do
addSubRollout theSubRollout subroll
)
)
createDialog mainTabs 440 600 pos:[50,50]
Now the Problem is as follows: I know I can access UI elements in another Tab/Rollout by typing rolloutname.property.
And I'm doing that, BUT: I need a value from a Spinner which I set at the Point the Rollout is created (logically). So when I call this value from another Rollout and didnt have the rollout with the value contained open before, it didnt get created and the value returns 0.
How tell the DotNet Dialog to "precreate" all rollouts and not create them at the point where i click the coresponding Tab?
I'm currently writing some script which uses DotNet to creaty a tabbed Dialog.
Here's te Code:
testTabs_Rollouts = #(
#("Source",#(rigRollout)),
#("Projectile",#(typeRollout, propertiesRollout, physicsRollout, impactEventRollout)),
#("Target",#(targetRollout)),
#("Animation",#(animationRollout))
)
rollout mainTabs "EasyShooter 0.1a"
(
dotNetControl dn_tabs "System.Windows.Forms.TabControl" height:20 width:420 align:#center
subRollout theSubRollout width:420 height:560 align:#center
on dn_tabs Selected itm do
(
if LastSubRollout != (itm.TabPageIndex+1) do --do not update if the same tab clicked twice
(
for subroll in testTabs_Rollouts[LastSubRollout][2] do
removeSubRollout theSubRollout subroll
for subroll in testTabs_Rollouts[LastSubRollout = itm.TabPageIndex+1][2] do
addSubRollout theSubRollout subroll
)
)--end mainTabs clicked
on mainTabs open do
(
for aTab in testTabs_Rollouts do
(
dn_tabs.TabPages.add aTab[1]
)
for subroll in testTabs_Rollouts[1][2] do
addSubRollout theSubRollout subroll
)
)
createDialog mainTabs 440 600 pos:[50,50]
Now the Problem is as follows: I know I can access UI elements in another Tab/Rollout by typing rolloutname.property.
And I'm doing that, BUT: I need a value from a Spinner which I set at the Point the Rollout is created (logically). So when I call this value from another Rollout and didnt have the rollout with the value contained open before, it didnt get created and the value returns 0.
How tell the DotNet Dialog to "precreate" all rollouts and not create them at the point where i click the coresponding Tab?
