PDA

View Full Version : Change size of dockable rollout?


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]

Light
11-23-2005, 06:09 PM
Paul,

I think that's the only way. I use the same method in Orionflame.




Light

PEN
11-23-2005, 07:52 PM
Ya it works but it pops. Did you find a work around to that?

When I go to resize it pops to the middle of the screen and then back to being docked. Also I have found that if you dock it to the left hand side of the command panel that is on the right, then you have to unregister and rereg and redock it, it ends up on the right hand side of the command panel. Any work arounds to that. Maybe undocking the command panel and redocking it. Wow, that would be a mess eh:S

Light
11-23-2005, 10:16 PM
I believe that you would need to undock the command panel and redock it or hide and unhide it. I only set the width to a specific value after the dialog is undocked, because the width is changed visually after that.

But in your case, when more things come into play, it becomes quite a mission and a half.




Light

Aearon
11-24-2005, 07:23 AM
slightly off-topic: has anyone gotten around this problem...

when i tear off a docked dialogbar, it always goes to it's minimum size... same thing when i drag it from one screeen to the other

PEN
11-24-2005, 11:30 AM
Try setting your minSize:[-1,-1] and that might do it.

CGTalk Moderation
11-24-2005, 11:30 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.