PEN
11-23-2005, 04:06 PM
Ok I have a rollout that is registered so that I can dock it on the left. I have an Ax Tab UI element that displays several rollouts and one of the tabs is "None" When i press None all the subRollouts are removed leaving only the tabs. I have the tabs on thier side so they go down the edge of the screen and take up as little space as possible. When I press None I also want the width of the Rollout to be set to 20 instead of 190. You can't do this to the rollout when it is registered as it complains. Before I go and write a bunch of code just to unregister, resize, reregister, redock the rollout does any one have a better way?
try
(
cui.unRegisterDialogBar test
destroyDialog test
)catch()
rollout subTest1 "Sub1"
(
listBox testLb height:6
button testBt1 "test"
button testBt2 "test2"
)
rollout subTest2 "Sub2"
(
listBox testLb height:6
button testBt1 "test"
button testBt2 "test2"
button testBt3 "test2"
button testBt4 "test2"
button testBt5 "test2"
button testBt6 "test2"
button testBt7 "test2"
)
rollout test "test"
(
activeXControl ax_tabs "MSComctlLib.TabStrip.2" height:200 width:20 offset:[-10,0]
subRollout sub1 "sub1" height:260 width:165 offset:[10,-205]
fn removeRollouts=
(
removeSubRollout sub1 subTest1
removeSubRollout sub1 subTest2
)
on ax_tabs click do
(
case ax_tabs.SelectedItem.index of
(
1:
(
removeRollouts()
--This doesn't work
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
maxSize:[0,-1]
)
2:
(
removeRollouts()
addSubRollout sub1 subTest1
--This doesn't work
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
maxSize:[190,-1]
)
3:
(
removeRollouts()
addSubRollout sub1 subTest2
--This doesn't work
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
maxSize:[190,-1]
)
)
)
on test open do
(
ax_tabs.placement=#tabPlacementLeft
ax_tabs.tabs[1].caption = "None"
ax_tabs.tabs.add pvCaption:"First Tab"
ax_tabs.tabs.add pvCaption:"Second Tab"
)
)
createDialog test width:190 \
style:#(#style_titlebar, #style_border, #style_sysmenu,#style_resizing)--height:260
test.sub1.height=260
addSubRollout test.sub1 subTest1
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
minSize:[0,0] maxSize:[190,-1]
try
(
cui.unRegisterDialogBar test
destroyDialog test
)catch()
rollout subTest1 "Sub1"
(
listBox testLb height:6
button testBt1 "test"
button testBt2 "test2"
)
rollout subTest2 "Sub2"
(
listBox testLb height:6
button testBt1 "test"
button testBt2 "test2"
button testBt3 "test2"
button testBt4 "test2"
button testBt5 "test2"
button testBt6 "test2"
button testBt7 "test2"
)
rollout test "test"
(
activeXControl ax_tabs "MSComctlLib.TabStrip.2" height:200 width:20 offset:[-10,0]
subRollout sub1 "sub1" height:260 width:165 offset:[10,-205]
fn removeRollouts=
(
removeSubRollout sub1 subTest1
removeSubRollout sub1 subTest2
)
on ax_tabs click do
(
case ax_tabs.SelectedItem.index of
(
1:
(
removeRollouts()
--This doesn't work
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
maxSize:[0,-1]
)
2:
(
removeRollouts()
addSubRollout sub1 subTest1
--This doesn't work
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
maxSize:[190,-1]
)
3:
(
removeRollouts()
addSubRollout sub1 subTest2
--This doesn't work
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
maxSize:[190,-1]
)
)
)
on test open do
(
ax_tabs.placement=#tabPlacementLeft
ax_tabs.tabs[1].caption = "None"
ax_tabs.tabs.add pvCaption:"First Tab"
ax_tabs.tabs.add pvCaption:"Second Tab"
)
)
createDialog test width:190 \
style:#(#style_titlebar, #style_border, #style_sysmenu,#style_resizing)--height:260
test.sub1.height=260
addSubRollout test.sub1 subTest1
cui.RegisterDialogBar test style:#(#cui_dock_vert,#cui_floatable,#cui_handles) \
minSize:[0,0] maxSize:[190,-1]
