Autor Beitrag
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 08.06.05 18:45 
Machs Doch über ne If-Abfrage:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var MsgType: TMsgDlgType; //IIRC
MsgType := mtNone;
if NameDesSymbols = 'Error' Then MsgType := mtError
else if NameDesSymbols = 'Info' Then MsgType := mtInformation
else if NameDesSymbols = 'Warn' Then MsgType := mtWarning;


Eine andere Möglichkeit wäre die Nutzung der RTL-Typinfo, jedoch ist diese nicht ganz einfach und zweitens recht langsam.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 08.06.05 18:47 
Da finde ich meine Lösung aber eleganter.