Board index » delphi » GETting the PRoperTieS

GETting the PRoperTieS

How do I retrieve a Component's Owner's properties.  i.e. When I create a
component by dropping it on a form, how could I retrieve the Form's
properties into the newly created component?

Thank You
Jim

 

Re:GETting the PRoperTieS


2 ways - if you know exact details of what the owner is, then you can do
something like this

var  
  ownerform : tform

begin
  ownerform := (self.owner as tform);
  ownerform.formstyle := {bla bla or wotever}

if you don't know exactly what type the owner is, then it's harder, but can
de done with RTTI.

--
Boris Ingram, Cyborg Software
boris...@iafrica.com
100076.3...@compuserve.com
http://www.pcb.co.za/users/borising/cyborg.htm

Jim Ley <jam...@pe.net> wrote in article
<01bc326d$ec0e1060$0f02000a@jamesa>...

Quote
> How do I retrieve a Component's Owner's properties.  i.e. When I create a
> component by dropping it on a form, how could I retrieve the Form's
> properties into the newly created component?

> Thank You
> Jim

Other Threads