Einzelnen Beitrag anzeigen

rebugger

Registriert seit: 29. Okt 2002
Ort: Auerbach
190 Beiträge
 
Delphi 7 Professional
 
#24
  Alt 1. Nov 2002, 21:40
Hm, ok, Problem auch wieder gelöst !
Mein aktueller Code:
Code:
function TMain.Intialize_Highlight(Highlight: TSynHighlighterAttributes; Section: String; Part: String; Standard: String): Bool;
var
  ini: TIniFile;
  tmp_style: TStringList;
begin
  ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'highlight.cfg');
  try
    tmp_style := TStringList.Create;
    try
      tmp_style.Add(StringReplace(ini.ReadString(Section,Part,Standard),',',#13#10,[rfReplaceAll]));
      Highlight.Foreground := StringToColor(tmp_style[0]);
      Highlight.Background := StringToColor(tmp_style[1]);

      if tmp_style[2] = '1' then
        Highlight.Style := Highlight.Style + [fsBold];
      if tmp_style[3] = '1' then
        Highlight.Style := Highlight.Style + [fsItalic];
      if tmp_style[4] = '1' then
        Highlight.Style := Highlight.Style + [fsUnderline];
      if tmp_style[5] = '1' then
        Highlight.Style := Highlight.Style + [fsStrikeOut];
    finally
      FreeAndNil(tmp_style);
    end;
  finally
    ini.Free;
  end;
  result := TRUE;
end;
Jetzt sagt er beim Aufruf:
[b]'$0045CDFA
clNone
0
1
0
0' ist kein gültiger Integerwert8/b]
  Mit Zitat antworten Zitat