[Closed] "scrollPos" equivalent for Dialogs?
Do rollout Dialogs have an equivalent to a rollout Floater’s .scrollPos property?
I’d wanted to use createDialog instead of newRolloutFloater, but I don’t see any get/set property controlling the scroll position.
Hey John,
Rollouts turned into dialogs with createdialog don’t have scroll bars – not sure what you’re referring to? Even when the dialog is shorter than the rollout, no scroll bars will appear, so dialogs are typically static unless you code a function that updates the positions of all the UI elements as it is resized (something I like to do). If you’re looking for a scrollable rollout style interface nested inside a dialog, you should look into subrollouts.
Hi,
As James mentioned, you have to do it yourself. You can use a treeview to use its scrollbar to move the controls up or down. Have a look at LayerMan to see a similar example. It doesn’t move dialog controls, but it shows how to use the scrollbar of a treeview.
Light
This is actually what I’ve done already, with a subrollout inside the dialog rollout, and multiple rollouts assigned to that one subrollout. It behaves and scrolls like a floater window, but I need to be able to get/set the scroll position…otherwise I have to use a floater.
Like this?
(
rollout nestedRollout "Nested"
(
button test1 "test"
button test2 "test"
button test3 "test"
button test4 "test"
button test5 "test"
button test6 "test"
button test7 "test"
)
rollout mainRollout "Scroll Test"
(
spinner scrollPos "Scroll:" scale:1 range:[0,120,0] type:#integer
subrollout theSub height:100
on scrollPos changed val do theSub.rollouts[1].scrollPos = val
on mainRollout open do addsubrollout theSub nestedRollout
)
createdialog mainRollout height:140
)