specxor
07-13-2005, 11:35 PM
Hi, Guys,
I have been trying very hard to get this tab strip working, I have tried everything i can think of to get this working but to no avail... grrr...
So here's the code, which i have mostly developed form reading other scripts, as in this case i did not find the maxreference that helpful (Though as usual the answer is most likely there)... Thanks in advanced for your help!
Cheers
Dave
try(destroyDialog test)catch()
rollout test "test bed" width:312 height:704
(
local tabNames = #("Quick", "Advanced", "Cameras", "Lights", "Help")
local roll_ar = #("vrman", "advanRoll", "camRoll", "LightRoll", "helpRoll")
local rollWidth = #(312,312,312,312,312)
local rollHeight = #(704,704,704,704,704)
activeXcontrol ax "MSComctlLib.TabStrip.2" height:20
subRollout sub1 width:314 height:0 pos:[1, 312 - 2]
on test open do
(
ax.tabs.clear()
ax.multiRow = false
for x = 1 to tabNames.count do
(
newTab = ax.tabs.add()
newTab.caption = tabNames[x]
)
)
FN btCon_fn btPres =
(
if btPres == 1 then
(
sub1.width = floatWidth
sub1.height = floatHeight
test.width = floatWidth
test.height = floatHeight
for x in roll_ar do (if x != undefined do (removeSubRollout Sub1 x))
)
else
(
for x in roll_ar do (if x != undefined do (removeSubRollout Sub1 x))
sub1.width = (floatWidth + rollWidth[btPres])
sub1.height = (floatHeight + rollHeight[btPres])
test.width = (floatWidth + rollWidth[btPres])
test.height = (floatHeight + rollHeight[btPres])
addSubRollout Sub1 roll_ar[btPres]
)
)
on ax click do
(
axT = ax.selectedItem
btCon_fn axT.index
for x = 1 to tabNames.count do ax.tabs[x].highLighted = false
ax.tabs[axT.index].highLighted = true
/*
clearListener()
--Show all the stuff
showProperties ax.tabs[1]
print "--------------"
showMethods ax.tabs
print "--------------"
showEvents ax.tabs
*/
)
)
rollout vrman "Quick Settings"
(
)
rollout advanRoll "Advanced Settings"
(
)
rollout camRoll "Camera Settings"
(
)
rollout LightRoll "Light Settings" width:312 height:695
(
)
createDialog test 316 715
I have been trying very hard to get this tab strip working, I have tried everything i can think of to get this working but to no avail... grrr...
So here's the code, which i have mostly developed form reading other scripts, as in this case i did not find the maxreference that helpful (Though as usual the answer is most likely there)... Thanks in advanced for your help!
Cheers
Dave
try(destroyDialog test)catch()
rollout test "test bed" width:312 height:704
(
local tabNames = #("Quick", "Advanced", "Cameras", "Lights", "Help")
local roll_ar = #("vrman", "advanRoll", "camRoll", "LightRoll", "helpRoll")
local rollWidth = #(312,312,312,312,312)
local rollHeight = #(704,704,704,704,704)
activeXcontrol ax "MSComctlLib.TabStrip.2" height:20
subRollout sub1 width:314 height:0 pos:[1, 312 - 2]
on test open do
(
ax.tabs.clear()
ax.multiRow = false
for x = 1 to tabNames.count do
(
newTab = ax.tabs.add()
newTab.caption = tabNames[x]
)
)
FN btCon_fn btPres =
(
if btPres == 1 then
(
sub1.width = floatWidth
sub1.height = floatHeight
test.width = floatWidth
test.height = floatHeight
for x in roll_ar do (if x != undefined do (removeSubRollout Sub1 x))
)
else
(
for x in roll_ar do (if x != undefined do (removeSubRollout Sub1 x))
sub1.width = (floatWidth + rollWidth[btPres])
sub1.height = (floatHeight + rollHeight[btPres])
test.width = (floatWidth + rollWidth[btPres])
test.height = (floatHeight + rollHeight[btPres])
addSubRollout Sub1 roll_ar[btPres]
)
)
on ax click do
(
axT = ax.selectedItem
btCon_fn axT.index
for x = 1 to tabNames.count do ax.tabs[x].highLighted = false
ax.tabs[axT.index].highLighted = true
/*
clearListener()
--Show all the stuff
showProperties ax.tabs[1]
print "--------------"
showMethods ax.tabs
print "--------------"
showEvents ax.tabs
*/
)
)
rollout vrman "Quick Settings"
(
)
rollout advanRoll "Advanced Settings"
(
)
rollout camRoll "Camera Settings"
(
)
rollout LightRoll "Light Settings" width:312 height:695
(
)
createDialog test 316 715
