>- What type do I make the property? TPersistent?

A TList?

>- If I did the above there would be a need to typecast the >property.
There must be a better way to do that aside from if >The_Control is
TImage then TImage(The_Control).Canvas etc.

I guess you could always do something like

// uses Provider; // var CanvasObject: TObject;
CanvasObject := GetObjectProperty(The_Control, 'Canvas');
if Assigned(CanvasObject) and (CanvasObject is TCanvas) then
  with TCanvas(CanvasObject) do begin
...

Cheers,

Carl Reynolds                      Ph: +64-9-4154790
CJN Technologies Ltd.             Fax: +64-9-4154791
[EMAIL PROTECTED]                DDI: +64-9-4154795
PO Box 302-278, North Harbour, Auckland, New Zealand
12 Piermark Drive, North Harbour Estate, Auckland, NZ
Visit our website at http://www.cjntech.co.nz/

> -----Original Message-----
> From: Donovan J. Edye [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, September 29, 1999 7:02 PM
> To:   Multiple recipients of list delphi
> Subject:      [DUG]:  [Q] Common Ancestor - TCanvas....
> 
> G'Day All,
> 
> As part of a component I would like one of the properties to be a list
> of controls that have a canvas property. Now I realise that I could
> traverse all the components owned by the form to determine if it had a
> TCanvas property. However what I don't understand is:
> 
> - What type do I make the property? TPersistent?
> - If I did the above there would be a need to typecast the property.
> There must be a better way to do that aside from if The_Control is
> TImage then TImage(The_Control).Canvas etc.
> 
> Any pointers etc. would be greatly appreciated.....
> 
> ----------------------------------------------------------------------
> ----------
> --Donovan
> Donovan J. Edye [www.edye.wattle.id.au]
> Namadgi Systems, Delphi Developer
> Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED]
> Voice: +61 2 6285-3460 Fax: +61 2 6285-3459
> TVisualBasic := Class(None);
> ----------------------------------------------------------------------
> ----------
> 

application/ms-tnef

Reply via email to