Autor Beitrag
inselberg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458



BeitragVerfasst: Di 17.05.05 10:36 
hi,

wie kann ich die formatierungen eines rtfs mittels richedit auslesen.

danke

edit//
atm mache ich es per
ausblenden Delphi-Quelltext
1:
2:
3:
SaveToStream(ms);
PlainText := true;
LoadFromStream(ms);


was jedoch auch nicht die lösung sein kann oder?

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.

_________________
hans bist du das ?
MrFox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 208

WIN 2000 Professional, Ubuntu 5.10
D3 Prof, D7 Pers, D2005 Pers, Java (Eclipse)
BeitragVerfasst: Di 17.05.05 12:13 
Mir fällt da ein, das man den betreffenden Text mit SelStart/SelLength markieren könnte, und anschließend mit SelAttributes die Formatierungen auslesen bzw. ändern könnte.
inselberg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458



BeitragVerfasst: Di 17.05.05 20:19 
nich kenn ja nur die formatierung nicht den text ;)
so trivial ist es nun auch nicht

_________________
hans bist du das ?
MrFox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 208

WIN 2000 Professional, Ubuntu 5.10
D3 Prof, D7 Pers, D2005 Pers, Java (Eclipse)
BeitragVerfasst: Mi 18.05.05 11:03 
user profile iconinselberg hat folgendes geschrieben:
nich kenn ja nur die formatierung nicht den text ;)


Dann brauchst du sie auch nicht mehr auslesen.
inselberg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 458



BeitragVerfasst: Mi 08.06.05 01:38 
hohoho
und wie komm ich jetzt an den text dessen formatierung ich kenne ...

erst denken dann "lustig" sein wollen machen tun

_________________
hans bist du das ?
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mi 08.06.05 10:12 
Hallo,

interpretiere ich Deine Frage richtig :?
z.B, nehme mal an das Dein Text den Du suchst den Style fsBold hat, hier mal ein Ansatz zum ermitteln:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
var z : integer;
    s : String;
begin
  s := '';
  for z := 0 to Length(RichEdit1.Text)-1 do
    begin
      RichEdit1.SelStart := z;
      RichEdit1.SelLength := 1;
      if fsBold in RichEdit1.SelAttributes.Style then
        s := s+RichEdit1.SelText
        else
          if s <> '' then
            begin
            Memo1.lines.Add(s);
            s := '';
            end;
      //Ende if fsBold
    end;//Ende for z
end;


Um den fett formatierten Text direkt aus der Datei zu holen, ist mehr Aufwand erforderlich. -ist aber möglich-

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )