2
votes

Delphi XE2

I am trying out the creation of an ActiveX control for the first time. Steps follow

1) Create ActiveX library 2) Create ActiveX Controls Wizard field Component Name does not show my VCL component. The component is visible under installed packages and other components in that .bpl are visible in the Component Name dropdown list.

Why are some components visible whilst others not

TIA

Ephraim

1

1 Answers

2
votes

VCL controls that can be wrapped in an ActiveX have to be TWinControl descendants that have not been marked as being incompatible, and that are either installed in the IDE or have had its unit added to your project. From the Delphi docwiki (emphasis mine):

In the ActiveX Control wizard, select the name of the VCL control that will be wrapped by the new ActiveX control. The dialog lists all available controls, which are descendants of TWinControl that are not registered as incompatible with ActiveX using the RegisterNonActiveX procedure.

Tip: If you do not see the control you want in the drop-down list, check whether you have installed it in the IDE or added its unit to your project.

So the first thing you have to do is ensure that your component descends from TWinControl, not just TComponent.