Autor Beitrag
firefuzy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Mi 24.05.06 09:24 
Hallo!
Das ist meine nächste Frage:
Gibt es eine Möglichkeit im Richedit doppelt zu unterstreichen?

MfG firefuzy


Moderiert von user profile iconGausi: Topic aus Sonstiges (Delphi) verschoben am Mi 24.05.2006 um 13:59
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 24.05.06 11:46 
Hallo,

ja und nein :roll:

im Standard-RichEdit kann man Wörter über CharFormat2(Konstanten: CFM_UNDERLINETYPE und CFU_UNDERLINEDOUBLE) doppelt unterstreichen, diese Formatierungen werden aber nur als normal unterstrichen dargestellt.
Speichert man nun einen mittels CharFormat2 formatierten Text mit RichEdit.Lines.SaveToFile( werden die entsprechenden Formatierungen mit in die Datei geschrieben.

Das Formatieren funktioniert so:
:!: In uses RichEdit einbinden :!:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure TForm1.Button1Click(Sender: TObject);
var frm : TCharFormat2;
begin
  with RichEdit1 do
    begin
    SetFocus;
    FillChar(frm, SizeOf(frm), 0);
    with frm do
      begin
        cbSize := SizeOf(frm);
        dwMask := CFM_UNDERLINETYPE;
        bUnderlineType :=  CFU_UNDERLINEDOUBLE;
        Perform(EM_SETCHARFORMAT, SCF_SELECTION, Longint(@frm));
      end;
    Lines.Add('Doppelt unterstrichen?');
    Lines.SaveToFile('C:\temp\underline2.rtf');
    end;
end;


Öffnest man nun die erstellte rtf-Datei mit z.B. Word, sieht man das der Text doppelt unterstrichen ist.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Fr 26.05.06 20:06 
Dickes Dankeschön! :D
Aber wie 'malt' man den Text auf ein Image bzw. auf einen Printer?
(Ich will den Text ausdrucken).
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Mo 05.06.06 17:29 
Weiß den keiner eine Antwort??
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 06.06.06 04:40 
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Mo 12.06.06 20:24 
Tut mir Leid, mit diesem Code wird gar nichts unterstrichen. Weder einmal noch zweimal...
Das ist ja aber auch kein Wunder da der Code kein Richedit unterstützt sondern eine Listbox...
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Di 11.07.06 15:13 
Hallo???
Krieg ich bitte mal ne Antwort???
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Di 11.07.06 16:14 
Schau mal, ob TJvRichEdit (JEDI VCL) das kann. Ansonsten schaust du mal bei torry.net nach TRichEdit98, das kanns sicher

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Mi 26.07.06 12:02 
Hab ich meien Frage zu umständlich gefragt???
Zitat:
(Ich will den Text ausdrucken).

Ich habs jetzt dadurch gelöst, dass ich zweimal canvas.moveto und canvas.lineto benutze.

MfG firefuzy