<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Comments for Replacing TabSheets with Frames - by Dan Miser</title>
<link rel="alternate" type="text/plain" href="http://dn.codegear.com/article/32047" title="Replacing TabSheets with Frames - by Dan Miser" />
<link rel="self" type="application/atom+xml" href="http://dn.codegear.com/article/32047/feed" title="Comments for Replacing TabSheets with Frames - by Dan Miser" />
<id>http://dn.codegear.com/article/32047</id>
<updated>2008-12-04T12:34:37-08:00</updated>
<entry>
<title>re: Replacing TabSheets with Frames</title>
<author>
<name>henk holterman</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36969</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36969</id>
<updated>2004-06-14T03:03:02-07:00</updated>
<published>2004-06-14T03:03:02-07:00</published>
<summary>re: Replacing TabSheets with Frames</summary>
<content>&gt; Frames can be easly replaced by TForms which &gt; are much more suitable for visual inheritence. Are you sure? Forms can be nested inside other Forms allright but I remember some issues about not cooperating well with the mainForm for Hotkeys and/or ActionsFrames are more 'neutral' and if you want them to br free-floating you can easily mount them in a (ToolWin) Form-hh-</content>
</entry>
<entry>
<title>re: Replacing TabSheets with Frames</title>
<author>
<name>Ivan Lucena</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36816</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36816</id>
<updated>2004-06-01T11:23:49-07:00</updated>
<published>2004-06-01T11:23:49-07:00</published>
<summary>re: Replacing TabSheets with Frames</summary>
<content>You know what? It could be easier than that if you use &quot;ManualDock&quot;:- Create a new Application and drop a PageControl;- Create a new Form and add the following 2 lines at OnCreate:procedure TForm2.FormCreate(Sender: TObject);begin  ManualDock(Form1.PageControl1, nil, alClient);  Show;end;If you found a problem with that let me know!Ivan</content>
</entry>
<entry>
<title>Replacing TabSheets with Frames</title>
<author>
<name>Piotr Likus</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36660</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36660</id>
<updated>2004-05-11T00:51:35-07:00</updated>
<published>2004-05-11T00:51:35-07:00</published>
<summary>Replacing TabSheets with Frames</summary>
<content>Frames can be easly replaced by TForms which are much more suitable for visual inheritence. I've received several signals that TFrames are buggy in property saving. TForms can be displayed alone or inside TCustomPanel, probably also on TTabSheet. For TForms you can use the example code below:-------------------------------------------------------procedure TMyForm.ShowInPanel(APanel: TCustomPanel);begin  Self.Hide;  Self.BorderStyle := bsNone;  Self.Parent := APanel;  Self.Align := alClient;  Self.Show;end;procedure TMyForm.HideFromPanel;begin  Self.Hide;  Self.Parent := nil;end;</content>
</entry>
<entry>
<title>Replacing TabSheets with Frames</title>
<author>
<name>Patrick Foley</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36658</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36658</id>
<updated>2004-05-10T22:11:03-07:00</updated>
<published>2004-05-10T22:11:03-07:00</published>
<summary>Replacing TabSheets with Frames</summary>
<content>No wonder I never was to get the frames to work! One thing I do is use tabsheets in the IDE and hide them in runtime. Also an old Tex and X MDI trick I use is assigning a forms owner to a tabsheet instead. Further improvement is to develop a form and place its sub directory in the main project leave the form's project file inplace but import the unit into the main project. This allows the unitto be fine tuned later without messing with the main code. Alsothe main code is lighter in IDE and loading too!-Pat   </content>
</entry>
<entry>
<title>re: Replacing TabSheets with Frames</title>
<author>
<name>Dan Miser</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36657</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36657</id>
<updated>2004-05-10T13:19:02-07:00</updated>
<published>2004-05-10T13:19:02-07:00</published>
<summary>re: Replacing TabSheets with Frames</summary>
<content>Thanks much to everyone for all of the feedback so far. I'll definitely take a look at implementing Hallvard's AutoFree suggestion. Perhaps I'll take the extra effort and wrap up a TPageControl descendant as well, and then update both CodeCentral and this article with the new improvements.Keep the comments coming, guys!</content>
</entry>
<entry>
<title>Replacing TabSheets with Frames</title>
<author>
<name>Hallvard Vassbotn</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36652</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36652</id>
<updated>2004-05-10T07:34:23-07:00</updated>
<published>2004-05-10T07:34:23-07:00</published>
<summary>Replacing TabSheets with Frames</summary>
<content>Nice article and technique, Dan.One improvement:  // You can get AVs due to Tabsheet.OnHide destroying the frame and code relying  // on the frame to still be there in e.g. PageControl1.OnChange/OnChanging  if AutoFreeFrame then    DestroyFrame(Sender as TTabsheet);The decision to AutoFree the frame should probably be left to the frame itself. It is in a better position than the hosting form to decide if the resource reduction gained is worth the time and effort to recreate the frame contents later (rereading stuff from a server, for instance). The descision could even change at runtime depending on the actual contents.I would extend the OnHide method to include a var AutoFree: boolean parameter for this (or just add another method to the interface, or add another interface).</content>
</entry>
<entry>
<title>re: Replacing TabSheets with Frames</title>
<author>
<name>Hallvard Vassbotn</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36651</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36651</id>
<updated>2004-05-10T07:30:32-07:00</updated>
<published>2004-05-10T07:30:32-07:00</published>
<summary>re: Replacing TabSheets with Frames</summary>
<content>&gt; your frame has to descend from TFrameThis is not strictly true. As long as the TBaseFrame is also a visual frame that inherits from TFrame, and the TBaseFrame is registered as part of the project, you can inherit from TBaseFram in your secondary frames.</content>
</entry>
<entry>
<title>Replacing TabSheets with Frames</title>
<author>
<name>Doychin Bondzhev</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36630</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36630</id>
<updated>2004-05-08T00:08:35-07:00</updated>
<published>2004-05-08T00:08:35-07:00</published>
<summary>Replacing TabSheets with Frames</summary>
<content>Well the article is good but it misses one major problem when using frames and it is the limitation that IDE sets that if you want to desing a frame with Delphi your frame has to descend from TFrame. You can't desing anything that does not descend from TFrame so you you will loose the RAD aproach when you put somthing betinw your actual frame class and TFrame.Doychin</content>
</entry>
<entry>
<title>Replacing TabSheets with Frames</title>
<author>
<name>Rossen Assenov</name>
<uri>http://threads.codegear.com/threads/threads.exe/userall?commentid=36627</uri>
</author>
<id>http://threads.codegear.com/threads/threads.exe/view?commentid=36627</id>
<updated>2004-05-07T16:30:38-07:00</updated>
<published>2004-05-07T16:30:38-07:00</published>
<summary>Replacing TabSheets with Frames</summary>
<content>Dan,This is a nice extension to the TFrame but still requires some manual coding ;) and suffers from some of the same problems. And you cannot see the frames embeded in the tab sheet at design time.I've written a similar framework a few weeks ago - it uses TForm and it doesn't have the problems associated with using frames. You can see how everything looks at design time and it doesn't need coding :).Take a look at : http://codecentral.borland.com/codecentral/ccWeb.exe/listing?id=21696Regards,Rossen Assenov</content>
</entry>
</feed>
