to make rollout rolledUp button

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dussla's picture

perpect wow wow

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

jahman's picture

.

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
)
titane357's picture

Hi, Thanks for this exemple.

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

jahman's picture

.

use rolledUp event + rolloutFloater size property

AttachmentSize
resizerolloutfloater.gif 68.69 KB
titane357's picture

Which version of max do you

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

jahman's picture

.

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's picture

You're the king :-)

You're the king :-)

dussla's picture

about rollout position

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~~

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.