Use an include file containing the definition for the enum. You'll then have
two definition for the enum. You'll probably have to cast one into the
other.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

----- Original Message ----- 
From: "John Barrat" <[EMAIL PROTECTED]>
To: "'Borland's Delphi Discussion List'" <[email protected]>
Sent: Thursday, December 28, 2006 2:23 PM
Subject: Visibility and Scope


> I have a custom control which I have written which itself uses a sub
> components and sub classes which I don't want to expose beyond the
> Component.
>
> However, there are some aspects of these sub components I need to expose
as
> properties in the component.  The problem I have is that some of these
> properties are Enum types which are defined in the subcomponent.
>
> How can I get these Enums exposed to the Main application code using the
> component?  I have tried aliaising through the component but this doesn't
> work.  The only way I can get access to these types is by referencing the
> subcomponents in the Uses section of the Main code.
>
> By way of example:
>
> I have a component TMultiCom which uses a subcomponent TComPort
> TComPort has a Property of Enum Type BaudRate (comprising br1200, br9600
> etc)  I have a ComSettings property in my TMultiCom control which includes
> the Enum property BaudRate.
>
> Without adding ComPort to my Uses section of my application how do I make
> this Enum type available to my application?
>
> John Barrat
>
>
>
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to