Search code examples
delphidelphi-2007vclcustom-componentdatamodule

Creating a custom form designer


I'd like to create a custom "datamodule" in Delphi, a TDataModule like (maybe inherited) class which would have a custom grid based design interface (one component per line, some properties as columns). Is this possible? Where should I start?

I'm currently using Delphi 2007.


Solution

  • As Nick Hodges pointer out here:

    Drawing on a DataModule in Delphi

    it would be difficult to paint on the TDataModule descendant. Not impossible probably, but not worth the trouble for sure.

    I would consider designing a completely new TDataModule from scratch, so you would have complete control over it. Sure a lot of work probably, but in the end it would pay off.

    You can find TDataModule class in the Classes.pas unit. But this is just the runtime part of the code. Other parts are IDE related. You can find units related to ToolsAPI in "c:\Program Files\Borland\BDS\4.0\source\ToolsAPI\" for BDS 2006 for instance. You can also derive you own data module from TDataModule and register it with RegisterCustomModule (DesignIntf.pas). I don't know much more on this subject, maybe others do. As I said it would not be easy to do something like that. But maybe with this initial information you can find what you want.