procedure FillHtml(const pnl: TIpHtmlPanel); const BREAK = '
'#13#10; GEHT_DOCH = 'geht also doch'; IRGENDWIE = ' irgendwie'; var lvsZeile, lvs : string; i, lvnSize : integer; function SetFont(const pcsText: string; const pcsColor : string = 'Red'; const pcnFontSize : integer = 26):string; begin result := Format('%s',[pcsColor, pcnFontSize, pcsText]) end; procedure NewLine(const pcnAnz : integer = 1); var i:integer; begin for i := 0 to pcnAnz do lvs := lvs + '
'#13#10 end; function Italic(const pcsText:string):string; begin result := ''+pcsText+'' end; function Bold(const pcsText:string):string; begin result := ''+pcsText+'' end; procedure HintenDran(const pcs:string); begin lvs := lvs + pcs end; function EntEumeln(const pcs:string):string; var i: integer; c : char; s : string; begin result := ''; for i := 1 to length(pcs) do begin c := pcs[i]; case c of #195: s := ''; #132: s := 'Ä'; #150: s := 'Ö'; #156: s := 'Ü'; #164: s := 'ä'; #182: s := 'ö'; #188: s := 'ü'; #159: s := 'ß'; else s := c; end; result := result + s; end; end; begin lvs := ''; HintenDran(SetFont(Bold('H')+'allo','Blue',20)+BREAK+BREAK); HintenDran(SetFont(Italic('W')+'elt','Red',16)+BREAK+BREAK); NewLine(2); lvnSize := 10; for i := 1 to length(GEHT_DOCH) do begin HintenDran(SetFont(GEHT_DOCH[i],'Black',lvnSize)); inc(lvnSize); end; for i := 1 to length(IRGENDWIE) do begin HintenDran(SetFont(IRGENDWIE[i],'Black',lvnSize)); dec(lvnSize); end; pnl.SetHtmlFromStr(EntEumeln(lvs)); end;