Creating A Drop Down

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2013   #1
Creating A Drop Down

Hello

Im new to Maxscript and was wondering if you guys could help me out.
Basically i have to create a UI to do various things.
I need to create a drop down list and when an object is selected it creates it in max..
Been stuck on this for ages
This is what ive got so far:

try (destroydialog test_button) catch ()

rollout test_button "Reset Max"
(

button theButton "Reset Max"---Creates Button

on theButton pressed do---When pressing Button
resetMaxFile #noprompt---Resets Max File

dropdownlist scale_dd "Shape:" items:#("Box", "Plane", "Pyramid", "Cone")
on scale_dd selected i do
format "You selected '%'!\n" scale_dd.items[i]---???????????????
)
createDialog test_button 300 150




Ill be grateful for any help

Thanks
 
Old 03 March 2013   #2
Here you go, try this!
Code:
try (destroydialog test_button) catch () rollout test_button "Reset Max" ( -- store the classes you want to make into an array -- This can be added to local classItems =#(Box, Plane, Pyramid, Cone, Torus, Hedra, Capsule) button theButton "Reset Max"---Creates Button on theButton pressed do---When pressing Button resetMaxFile #noprompt---Resets Max File dropdownlist scale_dd "Shape:" items:(for i in classItems collect i as string) -- call the constructor of the class item from the selected index of the dropdownlist on scale_dd selected i do classItems[i]() ) createDialog test_button 300 150
__________________
Regards,
Pete

Read my technical blog - lonerobot.net
 
Old 03 March 2013   #3
Quote:
Originally Posted by Shade926
Im new to Maxscript ...
Been stuck on this for ages ...

sounds like paradox

but you are in the right place. all people are very kind here and always ready to help.
 
Old 03 March 2013   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:52 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.