Board index » delphi » ActiveX Issues! Please Help!
Sam
Delphi Developer |
ActiveX Issues! Please Help!2003-11-12 07:55:02 PM delphi112 Hi, I have some problems regarding conversion of VCL Component to Non-Visual ActiveX Component. ISSUE 1: When I drop my Non-Visual ActiveX Component on the form, I see that the object inspector is crowded with all kinds of unwanted properties which are related to the TWinControl. Following are those properties: Align, Anchors, Cursor, DragCursor, DragMode, Enabled, Font, HelpContext, Height, HelpKeyword, HelpType, Hint, Left, ParentFont, ParentShowHint, PopupMenu, ShowHint, TabOrder, TabStop, Tag, Top, Width. I've seen another ActiveX control that does not have any of these properties, except the Tag. How is this achieved? I Understand that some of these properties like Font can be hidden by overriding the in TWinControl wrapper and lowering its visibility. But this doesn't work for most of them. It works for very few of the properties. Does anyone know how to remove(or make invisible) all these unwanted properties? ISSUE 2: How do I attach a property editor like stuff to a single property. I know about Property Pages, which appear only when the user click on the "Property Pages" icon. What I am interested in is something like what appears for 'TFont' property. In the Object Inspector, for a TFont property, there's a small button, which when clicked, a different dialog pops up. How is this done for ActiveX Components? If I have a property like: property SomeProperty: TSomeOtherClass read GetSomeProperty write SetSomeProperty when it is converted to ActiveX and the property is published, a combo-box appears for that property, to which no values can be set. How can I prevent this, and have a decent property dialog for this property? Can I attach that to a particular property page to a property so that its popped up when clicked? ISSUE 3: My Non-Visual ActiveX control, when dropped on the form is immovable. It is also not clickable, and it is resizable. How can I override all this? I also need to draw a bitmap onto it. How do I do this? ISSUE 4: Which is the most ideal class from which I can inherit my wrapper class? TWinControl or TWidgetControl or TCustomControl. Thanks in advance, |