Notifications
Clear all

[Closed] Resizing Rollouts?

I have a rollout floater that I’m populating with a few rollouts of various heights (standard width) and I was wondering how I would go about resizing the floater to fit the rollouts when I open and close them?

This is what I have right now, but I can’t figure out how to set the height

		rollout Roll_GroupButtons "GroupButtons" width:272 height:512
 		(
 			GroupBox grp1 "GroupBox" pos:[8,8] width:256 height:496
 			button btn_1 "Button1" pos:[16,32] width:240 height:24 
 			button btn_2 "Button2" pos:[16,472] width:240 height:24
 		)
 		rollout Roll_ComboBox "ComboBox" width:272 height:150
 		(
 			combobox combolist "" pos:[8,8] width:256 height:10
 		)
 
 		TestFloater = NewRolloutFloater "TEST" 285 210
 		AddRollout Roll_ComboBox TestFloater rolledUp:off
 		AddRollout Roll_GroupButtons TestFloater rolledUp:on
2 Replies

you can get the size of the rollout floater (height), get heights of all rollouts in the floater, and change the height of the particular one using its open event. where is a problem?


on <rollout> open do <rollout>.height = <val>

That doesn’t seem to work (unless I’m doing it wrong)? The open command isn’t controlling weather its rolled up or down but if the rollout itself is active.

So what happens when you use “on rollout open do” all the resizing happens once when the script starts and then never again when the rollouts roll up and down.

It would also be helpful if there was some kind of event that happened when rollouts rolled up and down or some way to set them to roll up or down.

As it is right now I have a button that resizes things but I can’t figure out how to roll them up and down =/


     (
    	global TestFloater
    	
    	rollout Roll_GroupButtons "GroupButtons" width:272 height:160 (
    		GroupBox grp1 "GroupBox" pos:[8,8] width:256 height:150
    		button btn_1 "Button1" pos:[16,32] width:240 height:24
    		button btn_2 "Button2" pos:[16,100] width:240 height:24
    		
    [b]		on btn_1 pressed do ([/b]
  [b]			TestFloater.size = point2 285 800[/b]
  [b]  			)[/b]
    		
    	)
    	
    	rollout Roll_ComboBox "ComboBox" width:272 height:150 (
    		combobox combolist "" pos:[8,8] width:256 height:10
    	)
     
    	try (closerolloutfloater TestFloaster) catch ()
    	
    		 TestFloater = NewRolloutFloater "TEST" 285 375
    		AddRollout Roll_ComboBox TestFloater rolledUp:off
    		 AddRollout Roll_GroupButtons TestFloater rolledUp:off
    	
    )

Alternatively I guess I could use “createdialog” but I can’t figure out how to resize those windows at all. At least with “NewRolloutFloater” it allows the user to resize the window manually.