To make your control usable in the visual designer, you add attributes to your class declaration.


  • [RegisterWidget(pidBrowser, ccGeneral)]: This is the most important attribute. It tells the IDE to add your control to the component palette under a specific category.
  • [RegisterInfo('My new widget', 'icon.png')]: Sets the description and icon that appear in the palette.
  • [DefaultName('MyWidget')]: Tells the designer to name new instances 'MyWidget1', 'MyWidget2', etc..
  • [PropertyDialog('MyProp', dlgColor)]: Links a property to a special editor, like a color picker or HTML editor.
  • [BindDelegates([...])]: This tells the IDE's Object Inspector which pre-made event delegates (like TQTXDOMMouseClickDelegate) are compatible with your control, populating the 'Events' tab.