Drawing on a DataModule in Delphi
Asked Answered
B

3

9

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?

Bakken answered 29/6, 2009 at 3:40 Comment(2)
You are talking about drawing on it at design time via the Open Tools API (OTA) right?Troublemaker
Yes, that is the kind of thing I had in mind. Something visible at design time, to provide a bit of visual documentation of relationships of stuff on a datamodule.Bakken
I
17

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...)

Impurity answered 29/6, 2009 at 3:47 Comment(2)
I remember the Diagram tab and tried to use it a number of times, but never actually found it helpful. I was just staring at a datamodule with about 30 tables on it and felt that if I could draw a circle around those, and a couple of arrows and bla bla bla, things would make so much more sense - however it probably wouldn't.Bakken
I guess because I used to demo the Diagramm tab I knew what it did and how it could be useful, I actually found it a very quick and useful way to "wire up" databound forms.Ramsdell
D
8

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.

Danaides answered 29/6, 2009 at 9:29 Comment(0)
H
2

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...

Hairpiece answered 1/7, 2009 at 2:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.