Notifications
Clear all

[Closed] creating controls on rollout depending on number of layers in scene?

i want to create few controls like label, checkbox, textbox, textbox (align:4) and all these will be created for each layer in the scene. i have no clue how to do this?

if there are 5 layers i want 5 rows of above controls to be created in that order.

if this is not possible to do in maxscipt… can someone give me an example for an activex control which can have label, checkbox, textbox, textbox… something like an editable listbox.

i am using max 8

18 Replies

There is the “execute” command that will allow you to run a string as MaxScript source code. You could generate the source code you need based upon how many layers, and then execute it. Such as creating a number of gui controls, and such.

i just found out about rolloutcreator… i think thats what i need to create controls on the fly. its dynamic rollouts… i will look into the execute thing now to see what it does exactly… thanks for the reply

like we have across: property for controls… is there something like this for a group… i want two groups to appear side by side…

and i also want a groupbox to be added surrounding the controls… but in this case i have tried using the .height property of the rollout to get the height but it doesnt work.

1 Reply
(@mustan9)
Joined: 11 months ago

Posts: 0

ah. rolloutcreator is the trick. I didn’t know about that one.

You can create groups side-by-side by defining the position and size of the groups. The automatic layout will only do one at a time (which sucks).

Instead of using native mxs controls you might want to check out the listview control. Each row in a listview can have a checkbox, and multiple columns with text. Unfortunately, it can’t display a textbox inside a cell, but there are other ways to make individual cells editable.

Martijn

i think u mean the activex listview control… i for one reason wanted to avoid it was because if the script is used in max 9 will it be a problem with the listview in case it has not been compiled with max 9…

and if not then please can you help me with it because i have no reference on using it and dont know its properties… i definitely want a checkbox and editable cells on two columns.

2 Replies
(@mustan9)
Joined: 11 months ago

Posts: 0

They used the control in the render to textures script. I think that’s been around since version 7.

(@ypuech)
Joined: 11 months ago

Posts: 0

It’s now a .Net ListView in Max 9.

crap so if i use it in 8 it wont work in 9… probably i will stick to the usual rollout thing.

ActiveX controls cannot work under Windows x64. But they can be used under Max 9 32 bits.

cool… anyone who can provide me with an example of listview with a checkbox and editable cells?

See “How To … Develop a Selected Objects Inspector using ListView ActiveX Control” in MAXScript Reference. It shows how to setup a ListView with checkboxes, add items etc.
About editable cells, take a look at LabelEdit property documentation in the ListView Reference.

Page 1 / 2