Notifications
Clear all

[Closed] Dynamic Rollouts

hi,
how could i add & remove controls into the same Rollout

i.e. I would like to use a button to add some controls and an other to remove some of them (i will use checkboxes to define the ones to remove).

10 Replies

You can’t add or remove controls from a standard maxscript rollout. You do have some workaround though like setting them to visible/invisible or generating a dynamic rollout on the fly and adding it to a subrollout.

I slightly hacky way is you could define controls outside the width of the defined rollout area and set their position dynamically.

Yhea, that too. Of course that requires you to know the number and type of controls beforehand.

You probably know this, Pete, what about .net forms? Can controls be added dynamically to them?

1 Reply
(@lonerobot)
Joined: 11 months ago

Posts: 0

Right on Marco, This would probably be a flexible method, the flowlayout panel is good for this sort of thing.

 PEN

Also look up rolloutCreator functions.

hi guys, thanks for your answers.
But it will not be possible to hide my controls.
I’m writing a new tool for PF that allows the users to access to parameters they define.
for this reason, i need to add and remove controls.
And with the RolloutCreator, unfortunately i can’t remove controls.

The you might want to try the subRollout method. Basically you create a subRollout control on your main rollout. Whenever you need to change/update the controls, you generate a new rollout dynamically (using the rolloutCreator for instance) and then add it to the subRollout.

 PEN

You can remove them by just rebuilding the rollout and display it again.

Cool, thanks for the tip

/me adds “flowlayout panel” to the list of stuff to check out

thanks for all your answers, i ll try it on your way Paul. ^^
I let you know if i’ve some problems with it.