Board index » cppbuilder » Re: Cycle through objects on a form / Dynamic Form objects ...
Remy Lebeau (TeamB)
![]() CBuilder Developer |
Re: Cycle through objects on a form / Dynamic Form objects ...2004-02-29 07:02:43 AM cppbuilder85 "Nick Rambarransingh" < XXXX@XXXXX.COM >wrote in message QuoteIs there a way to cycle through all the objects on a form, and read the ComponentCount and Components[] properties for accessing the owned children. On the other hand, controls that are displayed visually inside the form may not necessarily be owned by the form. A form is also a TWinControl descendant, and TWinControl has ControlCount and Controls[] properties for accessing the children that visually appear in the form. QuoteFor example, I would like to check a users access rights with all the control, such as a TPanel? QuoteSecond, what if I have a forem with a few Tedits and a grid, but I application can load the packages dynamically at runtime via the LoadPackage() function. A package is a special VCL-aware DLL, so you can have the package export functions that the application calls when needed, by using GetProcAddress() to get pointers to the exported functions. The package can then create new control instances and place them on the form and the form can access and manipulate them like any other control. In other words, essentially creating a plugin system, where new plugins contain new controls, and the application loads installed plugins when needed. Quoteit would have to persist, I am thinking database for that - right ? |