Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing on a DataModule in Delphi

I wonder how difficult it would be to be able to have a custom background or be able to draw on the datamodule canvas somehow so that the relationships of all the datasets can be nicely represented with arrows and stuff. Way back in Delphi 7 or so I seem to remember some sort of datamodule designer which has disappeared (I always found it annoying anyway).

Does anyone know if this is possible through some sort of IDE plugin or something?

like image 319
Alister Avatar asked Jun 29 '09 03:06

Alister


3 Answers

TDataModule is a direct descendant of TComponent, and as such, it doens't have a Canvas or any such painting provisioned in it. As is, there is no way to draw or paint on it.

It is conceivable that you could create a descendent that has a TCanvas, but you'd have to really hack into the IDE to get it to be drawn on at design-time. It is an interesting idea, however.

There used to be a "Diagram" tab on the designer for Datamodules. It did have the ability to put notes, boxes with text, and data relations. It was not very understood or used, and the feature was dropped, I guess. (Before my time at CodeGear...)

like image 63
Nick Hodges Avatar answered Sep 28 '22 10:09

Nick Hodges


Or, you may change the datamodule to a form. Leave it visible during development, for testing, documentation and debugging; and turn it it invisible for production. On the form you may put a visio viewer component and some datagrids, accessed thru a tab rack, for quick browsing of the data.

like image 29
PA. Avatar answered Sep 28 '22 09:09

PA.


I believe that some way to organize the components in visible groups on screen could be nice... I have a report DM which have tons of datasets, dataset providers and Rave DataSources (circa 40 components).... If I could create some groups to differentiate which is used in what report.

But this in DM designer itself, not on a separate drawing space...

like image 40
Fabricio Araujo Avatar answered Sep 28 '22 09:09

Fabricio Araujo