The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,042 other followers

What is the easiest way of getting Delphi to accept a newly added file as a frame and to treat it as such? – Stack Overflow

Posted by jpluimers on 2020/02/26

As this is still an issue with current Delphi versions: every now and then it looses which designers are needed for a frame:

[WayBack] What is the easiest way of getting Delphi to accept a newly added file as a frame and to treat it as such? – Stack Overflow (by Brian Frost)

<DCCReference Include="x\y\z\myFrame.pas">
  <Form>frameMy</Form> 
  <FormType>dfm</FormType>
  <DesignClass>TFrame</DesignClass>
</DCCReference>

Then check your .dfm file to see if it starts with the correct inherited or object as per Delphi – TInterfacedDataModule revisted – use ‘inherited’ in your .dfm files when your datamodules look like forms in the designer.

Oh and at design time, be very careful embedding frames. Better not to do it at all and for certain: do not embed frames in a nested way: [WayBack] Frames in 10.2.2 Hi Has anyone else had issues with frames under 10.2.2? The project seems to have lost its links to the frames? If I went to the Too… – Vince Bartlett – Google+

–jeroen

One Response to “What is the easiest way of getting Delphi to accept a newly added file as a frame and to treat it as such? – Stack Overflow”

  1. Steven Kamradt said

    I also had problem using TCardPanel on a frame recently. It seemed ok in the designer at first, but then when I reloaded it lost track of the cards and required surgical DFM work to recover the rest of the frame. This seemed to be isolated to one session. Using a tForm and embedding at runtime seems to work much more reliably than embedding frames. In my case I was loading frames/forms into a tStackPanel embedded in a scrollbox. If your adding duplicates, just make sure that the frame/form names get changed to something unique. For me the easiest way was to keep an integer form variable that I incremented with each add and appended to the existing name.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: