We have an application with many components in forms (panels, tabs, edits, drop-down lists, etc.). But depending on the user profile, most of them may be automatically filled and / or not visible. This way, users could do their job faster.
Question: is there an easier way to create, post, change ownership, etc. at runtime? I would like to create 2 .dfm files for this device and then tell something to use .dfm. For example: "Hi, the user is advanced, use Unit1Advanced.dfm!" A working example will be nice. I would also like to use this in Delphi 7, but it should work at least in Delphi XE.
What I know still exists:
ComponentsToCode function from GExperts can create code from this component as gabr, specified in this answer .- I could create 2 forms and create the desired one at runtime. But this means that there is one additional .pas file for each additional .dfm file. It will be harder to maintain.
- This answer seems like a clue. But I'm not used to the TReader and TWriter classes ...
source share