Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unclutter the form when a application has very many datasets

In a moderately complex database application in Delphi it's easy to have dozens of datasets (tables and queries) and associated datasources on a form.
All these clutter up the screen.
It gets worse when your form has a pagecontrol where every page has its own set of datasources et al.

If the Tables and Datasources were visual controls, at least they would only be visible on the Tabsheet where they're applicable.
I've thought about creating some container object that could hold many datasets and datasources, but never got round to it.

I also have cnPack which adds to option to hide non-visual components from view in the designer. However this is not helpful because it makes it hard to select them.

What's the solution to unclutter the form designer whilst still having the option to select the data access components?

(For what it's worth I'm working in Delphi 2007 and XE2)

like image 384
Johan Avatar asked Dec 03 '22 06:12

Johan


2 Answers

You could create a data module for each logical group of non-visual components. Then name the data module accordingly so you can relate it quickly to the page the components belong to.

like image 193
Heinrich Ulbricht Avatar answered May 24 '23 23:05

Heinrich Ulbricht


www.gexperts.org has a IDE plugin for delphi, which contains an option to hide/show all non-visual controls.

It is perfect for hiding all of the datasets etc so you can manipulate your components. You can then show them again when you need to access them.

To make life even easier you can customize the toolbar so you can hide/show them in a single click.

like image 21
Peter Avatar answered May 24 '23 22:05

Peter