TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: BRYAN SMITH
date: 1997-12-20 00:36:00
subject: TPageControl - who owns what ?

Can anybody explain a situation that confuses me regarding TPageControl ?
Suppose I have Form1.
Form1 has PageControl1.
PageControl1 has TabSheet1, Tabsheet2, and TabSheet3.
TabSheet3 has Image1.
If I use labels to walk up the chain of ownership, e.g. label1.Caption :=
Image1.parent.name ; then Delphi tells me that the chain of ownership is
   Image1-Tabsheet3-PageControl1-Form1.
But a code reference such as "With PageControl1.TabSheet3.Image1" is invalid.
However, "With Image1" is OK.
Also, suppose I drop a label onto TabSheet3 and it is Label1. Then if I drop
another label onto Tabsheet1, it will be label2, not label 1, indicating
that Tabsheets 1 and 3 can not themselves own labels: the labels are owned
by something higher than a tabsheet - perhaps the form.
An explanation of just what ownership rules Delphi uses here would be
appreciated.
--- PPoint 2.00
---------------
* Origin: Kingston, Canada (1:249/109.11)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.