ActiveX Controls Properties

There are two common properties for ActiveX controls, .pos and .size.

Other ActiveX properties are control specific and vary from one control to another.

For a list of all available properties except the two common properties listed above, you can use the ActiveX Control Inspector Function

showProperties <axControl>

 

Properties can be set as usual in MAXScript,

For example

ax.checkboxes = true

where ax is the control name and .checkboxes is a boolean property.

Additionally, there is support for color properties. The internal representation of colors for ActiveX controls is COLORREF(unsigned integer) so you will always get integers when reading them, but you can set them as follows:

For example

ax.forecolor = red -- if a .forecolor property exists

 

NOTE:

Colors in Microsoft Windows are represented as BGR instead of RGB values. Thus the above example will result in the foreground color to be BLUE and not RED. To specify the correct color, you can use a MAXScript color value and turn the order of the blue and red channels manually, or define a function to do so automatically,

For example

fn activeXColor theColor = (color theColor.b theColor.g theColor.r)

ax.forecolor = activeXColor red

See also

Active X Inspector Functions

ActiveX Controls in MAXScript Rollouts