user1009073
user1009073

Reputation: 3238

Delphi - Is there a way to hide/organize Components in DESIGN mode

In Delphi 2010... I am building a reasonably complex application. There are all kinds of non-visual VCL based components, such as TTable, TQuery, etc. I know I can put Data oriented components into a datamodule, so in design time, they don't show up on my main form. I am looking for a way to "hide" the other non-visual components. I know that I can hide them with GExperts, but as soon as you click on the form, they show up again. I seem to recall that there was a 'Component repository' type of component. You dropped it on your form, and then dropped all you other components into it... Can't find it though.

Is anyone aware of a way to accomplish this?

Thanks

Upvotes: 4

Views: 1720

Answers (1)

Ken White
Ken White

Reputation: 125749

Just put your other non-visual components on the DataModule as well. All non-visual controls can be placed there; it's only the visual (TControl/TWinControl) components that can't be (for obvious reasons - the data module has no visual aspect at runtime).

Note that this is useful even in applications that don't access databases of any sort. You can still create a TDataModule to hold all of your non-visual components like image lists, file open/save dialogs, and so forth.

Upvotes: 8

Related Questions