Notifications
Clear all

[Closed] changing all buttons properties in one go

Is it possible in maxscript to change many dotnet buttons properties in one go. I have hubris of buttons I have to change properties on with unique names on specific rollout. Is it possible to do something like:

controols=dotnetcontroll “system.windows.forms.Checkbox”
for q in controols.count do myrollout.q.backColor=(dotnetclass “System.Drawing.Color”).FromArgb 10 10 10

4 Replies
(for bt in rollout.controls  where ismybutton bt collect bt).ForeColor = (dotnetclass "System.Drawing.Color")...

maybe very stupid question but what supposed to mean “ismybutton” ? I tried everything already there.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

‘ismybutton’ is your function that confirm that collected button is what you need.
by analogy with:

for obj in objects where iskindof obj editable_mesh collect obj

for bt in myrollout.controls where classof bt !=BitmapControl and classof bt !=ComboBoxControl do …

I got it, thank you for help once again maxscript Master.