title: Some way to rearrange components positions, sizes, ownership (properties in general) at run-time following a design-time rule
body: <p>We have an application that have many components on the forms (panels, tabs, edits, comboboxes, etc...). But depending on the user profile, most of them could be filled automatically and/or not be visible. So, users could do their work faster.</p>
  
  <p>The question: Is there any easier way to create, position, change ownership etc, at runtime? I would like to create 2 .dfm files for a given unit and then have something to tell the application what .dfm to use. Like: "Hey! User is advanced, use the Unit1Advanced.dfm!" A working example would be nice. I would like to use that in Delphi 7 too, but it has to work <strong>at least</strong> in Delphi XE.</p>
  
  <p>What I know that exist till now:</p>
  
  <ol>
  <li><code>ComponentsToCode</code> function from <a href="http://www.gexperts.org" rel="nofollow noreferrer">GExperts</a> can create code from a given component as gabr pointed in this <a href="https://stackoverflow.com/a/1005576/460775">answer</a>.</li>
  <li>I could create 2 forms and create the desired one at runtime. But that means one additional .pas file to each additional .dfm file. This would be harder to maintain.</li>
  <li>This <a href="https://stackoverflow.com/a/4172404/460775">answer</a> seems to give a hint. But I am not used to TReader and TWriter classes...</li>
  </ol>