I'd like a function that takes an enum and returns a stringlist (or name:value pairs). It must be possible, the Object Inspector and Code Complete seem to do that. The pseudocode seems simple enough, but the details escape me....
function ParseEnum(e: Enum, S: TStringList): TStringList;
var
i: Integer;
begin
for i := 0 to length(enum) - 1 do
S.Add(GetEnumName(e, i));
Result := S;
end;