Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 799
user1009073 Avatar asked Feb 17 '23 08:02

user1009073


1 Answers

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.

like image 136
Ken White Avatar answered Mar 22 '23 23:03

Ken White