ListView ActiveX Control Example

NOTE:

ActiveX Controls have been deprecated by Microsoft in the latest versions of the Windows operating system in favor of the DotNet framework and its controls.

While MAXScript still supports ActiveX controls, these have to be installed and registered on the system to be accessible to MAXScript.

As a replacement of ActiveX controls, MAXScript supports DotNet controls in 3ds Max 9 and higher.

See the topic Converting ActiveX ListView Control to DotNet ListView Control for an example of switching existing ActiveX code to DotNet.

The following example will not work on your system unless it has a ListView ActiveX control installed.

SAMPLE SCRIPT

rollout controlR92 "Microsoft ListView Control, version 6.0"
(
activeXControl ax "{BDD1F04B-858B-11D1-B16A-00C0F0283628}" height:200 width:300 align:#left
--on ax Click do format "handler: Click\n" --on ax DblClick do format "handler: DblClick\n"
on controlR92 open do
(
showProperties ax
ax.MousePointer = #ccArrow
ax.GridLines = true
ax.AllowColumnReorder = true
ax.BorderStyle = #ccFixedSingle
ax.view = #lvwReport
chs = ax.columnHeaders
--showProperties chs --showMethods chs
hTargets = chs.Add()
hWeights = chs.Add()
hTargets.text = "Node"
hWeights.text = "Weights"
lis = ax.listItems
for i=0 to 10 do
(
local li
li = lis.Add()
li.text = "Item " + i as string
)
for li in ax.listItems do li.bold = true
li = ax.HitTest 100 1500
if li != undefined do
(
showProperties li
li.text = "Just Hit Tested"
showEvents controlR92.ax
showMethods controlR92.ax
)
)
)
nr92 = newRolloutFloater "Microsoft ListView Control, version 6.0" 350 300 10 10
addRollout ControlR92 nr92

See Also