Have a look in Typinfo.pas. I've always used it with published properties of
objects. I've used TObject.ClassInfo to get a pointer to the class's RTTI
information, then used GetPropInfo to get the information for a property.
However, I guess you could just call TypeInfo(TEnumeration) to get a pointer
to the type info for the enumeration.
Then, use GetTypeData to return a TTypeData structure which will tell you
the number of values in the enumeration, and use GetEnumName to get the
enumerated values and GetEnumValue to go the other way.
Cheers,
Andrew Cooke.
> -----Original Message-----
> From: Kieron Lawson [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, December 23, 1998 11:16 AM
> To: Multiple recipients of list delphi
> Subject: [DUG]: Enumerated Types
>
> I need a favour from those of you with 'Delphi Secrets' (I'm in
> Christchurch & my copy is in Auckland).
>
> If my memory serves me correctly, there is a way of getting a string
> value equivalent (which is effectively the compiler symbol name) of an
> enumerated type:
>
> Thus:
>
> type
> TEnumeration=(eThis,eThat,eSomethingElse)
>
> will give:
>
> 'eThis', 'eThat', 'eSomethingElse'
>
> I believe it's used by the designer interface for displaying options in
> components (eg Grid Options).
>
> Help!
>
> Thanks
> Kieron.
> --------------------------------------------------------------------------
> -
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz