Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by SirThornberry,
28. Okt 2005
hier mal ein kleines Beispiel wie man das macht. Folgendes ins MouseDown des RichEdit.
var LText, LSelectedWord: String;
LPos, LEnd, LLen: Integer;
begin
LText := RichEdit1.Lines.Text;
LLen := Length(LText);
LPos := RichEdit1.SelStart;
LEnd := LPos;
while (LEnd <= LLen) and not(LText in ) do
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by SirThornberry,
27. Okt 2005
ich weiß nicht ob es unter delphi5 schon ging aber unter delphi7 kann man von einem selektierten Text die Farbe so ändern:
var LAttributes: TTextAttributes;
LFont: TFont;
begin
if RichEdit1.SelLength > 0 then
begin
LFont := TFont.Create;
LAttributes := RichEdit1.SelAttributes;
LFont.Assign(LAttributes);