Machs Doch über ne If-Abfrage:
Delphi-Quelltext
1: 2: 3: 4: 5:
| var MsgType: TMsgDlgType; 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.