Autor Beitrag
HaRaH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65



BeitragVerfasst: So 13.02.05 12:12 
Hallo,
Weiß jemand, wie man in einem RichEdit-Feld die Textformatierung eines Strings ändern kann?
Und was für Informationen vom String brauche ich dafür? - Position und Länge? - Und muss der String markiert sein? Oder geht's auch ohne?

Vielen Dank im Vorraus!!

Gruß MaX
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: So 13.02.05 12:48 
Wenn der Text selektiert ist, geht es so:
ausblenden Delphi-Quelltext
1:
richedit1.SelAttributes.Style:=[fsBold];					

In SelAttributes stehen immer die Eigenschaften, die der selektierte Text hat. Wenn du einen Text, der nicht selektiert ist ändern möchtest, könntest du ihn vorher selektieren.
Eigenschaften selstart, selend, sellength, zu dem Thema kannst du auch die Delphi Hilfe befragen.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
HaRaH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65



BeitragVerfasst: So 13.02.05 15:40 
danke - damit ist mein Problem gelöst!

Gruß