TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BRYAN SMITH
from: NATHAN MALYON
date: 1998-01-03 13:04:00
subject: TPageControl - who owns

-=> A Communique from Bryan Smith to All was being thrown out the Airlock <=-
 BS> Can anybody explain a situation that confuses me regarding
 BS> TPageControl ? 
 BS> Suppose I have Form1.
 BS> Form1 has PageControl1.
 BS> PageControl1 has TabSheet1, Tabsheet2, and TabSheet3.
 BS> TabSheet3 has Image1.
 BS> If I use labels to walk up the chain of ownership, e.g. label1.Caption
 BS> := Image1.parent.name ; then Delphi tells me that the chain of
 BS> ownership is 
 BS> Image1-Tabsheet3-PageControl1-Form1.
 BS> But a code reference such as "With PageControl1.TabSheet3.Image1" is
 BS> invalid. However, "With Image1" is OK.
 BS> Also, suppose I drop a label onto TabSheet3 and it is Label1. Then if
 BS> I drop another label onto Tabsheet1, it will be label2, not label 1,
 BS> indicating that Tabsheets 1 and 3 can not themselves own labels: the
 BS> labels are owned by something higher than a tabsheet - perhaps the
 BS> form. 
 BS> An explanation of just what ownership rules Delphi uses here would be
 BS> appreciated.
from what i remember about a character generator i made all names
on all pages must be unique because label 1 on page 3 i can access from
page1
by just
Label1.caption := 'hello world!';
is useful and annoying
oh well
cya
"Hey Wait A Second, Ivanova *IS* God" - Kosh
       1 Starfury, 2 Starfury, 3 Starfury, RUN
              Babylon 5 : The Future Ain't What It Used To Be
JediAvenger@Hotmail.com
... Never, never, never load SRM inferno ammo backwards...
___ Blue Wave/QWK v2.20
--- Maximus 3.01
---------------
* Origin: The BEAST (3:640/245)

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™.