ScriptSpot

Forum topic · Scripts Wanted

to make rollout rolledUp button

By dussla · 2018-06-26

Description

sorry many ask ~
i found internet , but there is no clue ~
example
there is interface

i would like to make rolledup:false button / rolledup:true button

how can make that ?

(
rollout first_rollout "1st Rollout" category:2
(
label rights "First"
)
rollout second_rollout "2nd Rollout" category:1
(
label second "Second"
)
rf = newRolloutFloater "Rollout Order Test" 200 140
addRollout first_rollout rf rolledUp:true
addRollout second_rollout rf rolledUp:true
)

Comments (8)

perpect wow wow

dussla · 2018-06-27

wow wow really thank you
that is great ~
thank you really

.

jahman · 2018-06-26

You can't add any control to floater window directly.


(
local rf

rollout zero_rollout "" height:15 category:0
(
	button toggle "Open" align:#center width:180 height:32 offset:[4,-6]
	on toggle pressed do 
	(
		for r in rf.rollouts where r != zero_rollout do r.open = not r.open
		if toggle.text == "Close" then toggle.text = "Open" else toggle.text = "Close"
	)
)	
rollout first_rollout "1st Rollout" width:150 category:2
(
	label rights "First"
	
)
rollout second_rollout "2nd Rollout" category:1
(
	label second "Second"
)
rf = newRolloutFloater "Rollout Order Test" 200 200
addRollout zero_rollout rf rolledUp:false border:false
addRollout first_rollout rf rolledUp:true
addRollout second_rollout rf rolledUp:true
)

about rollout position

dussla · 2018-06-28

sorry
i wonder some

rf = newRolloutFloater "Rollout Order Test" 200 200 pos:[170,1180]

that is error

where i put positon code ?

sorry poor ask~~

titane357 · 2018-07-18

Hi,
Thanks for this exemple. But is there a way to change the panel size when opening or closing a rollout ?
Cheers

.

jahman · 2018-07-18

use rolledUp event + rolloutFloater size property

Attachments

titane357 · 2018-07-19

Which version of max do you use ? I use 2019.1 and the window don't resize... :-(

.

jahman · 2018-07-19

How do you set new floater size?
I have no 2019 nor 2018 to help you with it.


on second_rollout rolledUp state do 
(
	if state then rf.size += [0,second_rollout.height] else rf.size -= [0,second_rollout.height]
	
)

titane357 · 2018-07-20

You're the king :-)