Re: Enum order in component view
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 24 Oct 2005 20:16:26 +0200
"Sonnich" <sonnich.jensen@xxxxxxxxxxxxxx> wrote in message
news:1130169904.016309.217930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> When createing a component, I have this:
> TTimeScale = (tsAutomatic, tsYear, tsMonth, tsWeek, tsDay, tsShifts,
> tsHour);
>
> Which I'd like to see in that order in the object inspector.
> The point is that it sorts in alphabetic order: [...]
> which is not exactly cottect.
> Any idea to avoid this?
You can register a property editor. Delphi is using the default one
for enumerated types. While you can't change the behaviour of that,
you can ask the IDE to use yours for given types.
Read the source to DsgnIntf.pas, or a good book. Or experiment. It
can be done.
The source for D5's TEnumProperty definitely looks like it enumerates
all ordinal values in sequence, and does not sort alphabetically.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: Enum order in component view
- From: Sonnich
- Re: Enum order in component view
- References:
- Enum order in component view
- From: Sonnich
- Enum order in component view
- Prev by Date: Enum order in component view
- Next by Date: @ operator ? Or maybe not
- Previous by thread: Enum order in component view
- Next by thread: Re: Enum order in component view
- Index(es):