Autor Beitrag
bruce185
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

winXP
D7 Ent
BeitragVerfasst: Do 13.10.05 20:50 
hi,
ich bin gerade dabei ein Programm zu schreiben, man gebt einfach in RichEdit1 den HTML Code ein, dann möchte ich das die bestimmte codes eine andere farbe bekommen, in RichEdit1, habe es so probiert:

RichEdit1.FindText('<html>', clBlue);

wenn in RichEdit das drinne steht "<html>", dann soll das in einer andere farbe dargestellt werden, z.B. <html>

aber so wie ich das gemacht habe, kann das nicht gehen, ich kenne noch nicht alle befehle von RichEdit1, deswegen bitte ich um eure hilfe, ich danke euch schonmal :(

Andreas
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Do 13.10.05 21:59 
War keine schlechte Idee, mit SelText kommst Du vieleicht weiter aber, der beste Tip ist Du lädtst Dir die Komponente SynEdit runter. Die kann die Syntax der gängigsten Programmiersprachen im Code darstellen ohne das Du was .... (Html, Delphi, C++, &&&)
Top Komponente und auch noch umsonst. Einfach Genial
bruce185 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

winXP
D7 Ent
BeitragVerfasst: Mo 17.10.05 20:50 
das habe ich probiert, aber geht das nicht in einer normalen RichEdit Komponent?
ich möchte mein RichEdit einfach auf Strings prüfen, ob in RichEdit z.B. das hier drinn steht, <html>, dann soll das in ein andere farbe dargestellt werden, z.B. so <html>, nur wie soll das gehen, könntet ihr mir vieleicht ein kleines beispiel posten, ich wäre euch sehr dankbar, ich danke euch schonmal :(

Andreas
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mo 17.10.05 21:14 
Wenn du's wirlich ohne SynEdit tun willst dann schau mal dort.
Beispiel www.swissdelphicente...showcode.php?id=1143