2011-07-17 4 views

답변

7

행을 강조 표시하려면 OnSpecialLineColors 이벤트를 사용해야합니다. 당신은 줄의 단어를 찾을 수있는 기능을 만들 수 있습니다 (이 질문에 Is There An Efficient Whole Word Search Function in Delphi?를 확인) 한 후 행을

확인이 코드

procedure TFrmMain.SynEditCodeSpecialLineColors(Sender: TObject; 
    Line: integer; var Special: boolean; var FG, BG: TColor); 
begin 
    If LineContainsWord(Line) then //here check if the word is in the line 
    begin 
    FG  := clYellow; //Text Color 
    BG  := clBlue; //BackGround 
    Special := True; //Must be true 
    end;   
end; 
+1

감사 페인트! 이 이벤트는 언제 호출됩니까? – maxfax

+2

이벤트는 라인의 데이터가 변경 될 때마다 Synedit 구성 요소에 의해 호출됩니다. – RRUZ

관련 문제