🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #14

Moving a Form embeded in a PageControl

#14
From: Ramesh Yadav
Date: Tue, 01 Jun 2004 13:23
34 lines
2239 bytes
Please can anyone help on this:

Scenario:
I have a form that has two page controls. The first page control has 5
tabsheets. Four of these tabsheets each contain a form that has been
designed as a TForm and then embedded into tabsheet by changing Parent
and BorderStyle. The fifth tabsheet contains some controls, ignore
this one.

The second page control does not have any tabsheets at all. 

At runtime, the four tabs containing embedded forms, on the first page
control are moved to the new page control.

So now, first page control has 1 tab and the second page control has 4
tabs moved from first page control. For business purposes, you do not
need to know why two pagecontrols are being used, just that they are.

Problem:
When any of the four tabsheets containing embedded forms, are moved to
the new second pagecontrol, the embedded form disappears completely
from view. I can still locate the form that has moved by checking the
Controls array of the tabsheet. It just does not appear to be visible
although visible is true etc.

Anyone know why the form is "disappearing" when the tabsheet is moved
from one control to another?

I have tried placing a TPanel on the tabsheet and then creating the
form with the TPanel as a owner. When I move the TPanel parent from
page control 1 to page control 2, the form still disappears from view
(cannot be seen in tabs at runtime).

Thanks very much if you can help.
Technical Details
Message-ID: <cee4c803.0406010523.383f16f@posting.google.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d30,bbaad46e985b05a,start
X-Google-Attributes: gid109d30,public
Path: arc1-ca.pugleaf.net!controlnews3.google.com!postnews1.google.com!not-for-mail
From: ry@crystalsymphony.plus.com (Ramesh Yadav)
Newsgroups: borland.public.delphi.language.objectpascal
Subject: Moving a Form embeded in a PageControl
Date: 1 Jun 2004 06:23:27 -0700
Organization: http://groups.google.com
Lines: 34
Message-ID: <cee4c803.0406010523.383f16f@posting.google.com>
NNTP-Posting-Host: 213.86.243.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1086096207 3629 127.0.0.1 (1 Jun 2004 13:23:27 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 1 Jun 2004 13:23:27 +0000 (UTC)