Autor Beitrag
SuperS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 102

Win XP Home, Win XP Prof, Win 98

BeitragVerfasst: Do 08.04.04 21:08 
Wie kann ich, mittels eines Buttons den Text einer RichEdit Komponennte hoch-oder tiefstellen (hab's bei Texted gesehen)

_________________
Das Wissen ist nur ein Teil des Versthens.
Wirkliches Verstehen kommt erst mit der praktischen Erfahrung.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Do 08.04.04 23:43 
Habe auf swissdelphicenter mal einen Code gepostet.

Auf www.swissdelphicenter.ch/de/tipsindex.php nach RichEdit suchen
SuperS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 102

Win XP Home, Win XP Prof, Win 98

BeitragVerfasst: Fr 09.04.04 20:54 
Ich drücks mal auf meine Art aus:
Voll krasser Link he.
Ich hab da nicht nur gefunden was ich gefragt habe, sondern noch viele andere super fett krasse Sachen.

_________________
Das Wissen ist nur ein Teil des Versthens.
Wirkliches Verstehen kommt erst mit der praktischen Erfahrung.
SuperS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 102

Win XP Home, Win XP Prof, Win 98

BeitragVerfasst: Sa 10.04.04 22:50 
Nochmals Geile Seite die du mir gegeben hast, aber wie ich den Code ausprobiert habe, hab ich jmir nur gedacht:
Was ist den das für ein Sch@§$ ! Beim Compilieren zeigt Delphi massig Fehlermeldungen an, z.B. lauter undefinierte Bezeichner.
Hier ist der Code, den ich gefunden habe:

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
// yOffset values 
type 
  TCharacterFormat = (CFM_Superscript, CFM_Subscript, CFM_Normal); 

procedure RE_SetCharFormat(RichEdit: TRichEdit; CharacterFormat: TCharacterFormat); 
var 
  // The CHARFORMAT structure contains information about 
  // character formatting in a rich edit control. 
  Format: TCharFormat; 
begin 
  FillChar(Format, SizeOf(Format), 0); 
  with Format do 
  begin 
    cbSize := SizeOf(Format); 
    dwMask := CFM_OFFSET; 
    // Character offset, in twips, from the baseline. 
    // If the value of this member is positive, 
    // the character is a superscript; 
    // if it is negative, the character is a subscript. 
    case CharacterFormat of 
      CFM_Superscript: yOffset := 60; 
      CFM_Subscript: yOffset := -60; 
      CFM_Normal: yOffset := 0; 
    end; 
  end; 
  // The EM_SETCHARFORMAT message sets character formatting in a rich edit control. 
  // SCF_SELECTION: Applies the formatting to the current selection 
  Richedit.Perform(EM_SETCHARFORMAT, SCF_SELECTION, Longint(@Format)); 
end; 

// Examples: 
// Beispiele: 

// Apply Superscript to the current selection 
// Markierte Zeichen hoch stellen 
procedure TForm1.Button1Click(Sender: TObject); 
begin 
  RE_SetCharFormat(RichEdit1, CFM_Superscript); 
end; 

// Apply Subscript to the current selection 
// Markierte Zeichen tief stellen 
procedure TForm1.Button2Click(Sender: TObject); 
begin 
  RE_SetCharFormat(RichEdit1, CFM_Subscript); 
end;


ich hab ihn bei dem Link gefunden:

www.swissdelphicente...showcode.php?id=1331

_________________
Das Wissen ist nur ein Teil des Versthens.
Wirkliches Verstehen kommt erst mit der praktischen Erfahrung.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Sa 10.04.04 23:02 
ausblenden Delphi-Quelltext
1:
2:
uses 
  Richedit;
SuperS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 102

Win XP Home, Win XP Prof, Win 98

BeitragVerfasst: Sa 10.04.04 23:48 
Thanks. :wink:

_________________
Das Wissen ist nur ein Teil des Versthens.
Wirkliches Verstehen kommt erst mit der praktischen Erfahrung.