Surligner...

cs_papillotte Messages postés 4 Date d'inscription mardi 2 septembre 2003 Statut Membre Dernière intervention 26 mai 2004 - 22 mai 2004 à 21:50
cs_papillotte Messages postés 4 Date d'inscription mardi 2 septembre 2003 Statut Membre Dernière intervention 26 mai 2004 - 24 mai 2004 à 17:30
Papillotte

est ce qu'il est possible de surligner du texte ? dans un RichEdit ?
Merci

3 réponses

cs_liquide Messages postés 1016 Date d'inscription samedi 22 mars 2003 Statut Membre Dernière intervention 24 juin 2008
23 mai 2004 à 00:46
pas a ma connaissance

liquide
0
pcpunch Messages postés 1243 Date d'inscription mardi 7 mai 2002 Statut Membre Dernière intervention 18 février 2019 5
23 mai 2004 à 12:17
RichEdit????

j'ai beau chercher ce controle dans mon vb6???? a part le RichTextBox avec lequelle il est possible de surligner, je ne trouve pas ce controle ????
0
cs_papillotte Messages postés 4 Date d'inscription mardi 2 septembre 2003 Statut Membre Dernière intervention 26 mai 2004
24 mai 2004 à 17:30
Papillotte

en faite j'ai trouvé !

uses
RichEdit;

procedure RE_SetSelBgColor(RichEdit: TRichEdit; AColor: TColor);
var
Format: CHARFORMAT2;
begin
FillChar(Format, SizeOf(Format), 0);
with Format do
begin
cbSize := SizeOf(Format);
dwMask := CFM_BACKCOLOR;
crBackColor := AColor;
Richedit.Perform(EM_SETCHARFORMAT, SCF_SELECTION, Longint(@Format));
end;
end;

// Example: Set clYellow background color for the selected text.
procedure TForm1.Button1Click(Sender: TObject);
begin
RE_SetSelBgColor(RichEdit1, clYellow);
end;
0
Rejoignez-nous