addrollout _not_ as floater

Greetings to all maxscripters :)

Hope someone can help me with solving this little problem :

I want to change the content of a rollout (which is in the script window) by choosing an option from a given dropdownlist.

so my first attempt was something like this :
(taken from the maxscript help documentation)

rci = rolloutCreator "myRollout" "My Rollout"

rci.begin()

rci.addControl #button #myButton "My Button"
rci.addHandler #myButton #pressed filter:on codeStr:"MessageBox @Isn't this [email protected] title:@[email protected]"

createDialog (rci.end())

it could had been wunderful with "rolloutcreator" but i couldnt find a way
to avoid it from opening in a new window(floater).
[IMG]http://www.scriptspot.com/files/dont_want_this_window_with_rolloutcreator.JPG[/IMG]

so my thought was that i just use "removerollout" and "addrollout" instead, but only if "addrollout myrolloutwithallcontens" can open my rollout with all the elements like buttons, labels etc in it...

second attempt :
(also taken but modified from maxscript help docu)

(

rollout first_rollout "1st Rollout" category:2

(
label rights "First"
)

rollout third_rollout "3rd Rollout" category:1

(
label thirdl "third"
)

rollout second_rollout "2nd Rollout" category:1

(

label second "Second"

dropdownlist Technique "select Technique" items:#("","create 'third_rollout'","delete 'third_rollout'")

on Technique selected itm do
(

If itm == 2 do
(
addrollout third_rollout
)

If itm == 3 do
(
removerollout third_rollout
)

)

)

rf = newRolloutFloater "Rollout Order Test" 200 240

addRollout first_rollout rf

addRollout second_rollout rf

addrollout third_rollout rf

)

Now the problem is, after i deleted "3rd rollout", i cant add/open it anymore
by selcting the second choice from the dropdownlist...
[IMG]http://www.scriptspot.com/files/no_add_after_pressing_createthirdrollout.JPG[/IMG]

the second maxscript defines the best what i want.
I just want an interactive scipt were the choice made in the dropdownlist can change the look/options of the mainscript, but i dont want a new floating window.

So if somebody has a good plan or even little ideas i would be extra happy !
thank you :)

AttachmentSize
dont_want_this_window_with_rolloutcreator.JPG3.21 KB
no_add_after_pressing_createthirdrollout.JPG10.34 KB

Comments

Comment viewing options

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

ok, i finally got the idea

ok, i finally got the idea of "addrollout"

Everything is fine now, maybe this can help someone else (as beginner, just like me) who got this little question :

rci = rolloutCreator "myRollout" "My Rollout"
rci.begin()
rci.addControl #button #myButton "My Button"
rci.addHandler #myButton #pressed filter:on codeStr:"MessageBox @Isn't this [email protected] title:@[email protected]"
addrollout (rci.end()) --will add a new rollout on the bottom of the script

thanks for reading anyways .

Comment viewing options

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