Desabilitar o cursor na hora da procura no RichEdit ...
Estou usando o componente RichEdit no evendo onchange esta este codigo abaixo , toda vez que vc digitar no RichEdit a palava ´and´ ela fica em negrito mais tipo se vc digitar um monte de vezes ´and and and and and´ o cursor passa rapidamento sobre a palavra. Tem como disabilitar o cursor ?
var
nCt : Integer;
begin
for nCt := 0 to Length(re.Text) do begin
if re.FindText(´and´,nCt,Length(re.Text),[]) > nCt then begin
re.SelStart := re.FindText(´and´,nCt,Length(re.Text),[]);
re.SelLength := 3;
re.SelAttributes.Style := [fsBold];
end;
end;
re.SelStart := Length(re.Text);
end;
var
nCt : Integer;
begin
for nCt := 0 to Length(re.Text) do begin
if re.FindText(´and´,nCt,Length(re.Text),[]) > nCt then begin
re.SelStart := re.FindText(´and´,nCt,Length(re.Text),[]);
re.SelLength := 3;
re.SelAttributes.Style := [fsBold];
end;
end;
re.SelStart := Length(re.Text);
end;
Programadorjlle
Curtidas 0
Respostas
Diogoalles
04/02/2005
Inclua na seção uses: Windows
implemente as chamadas antes e depois do FOR
abraço
Diogo
- Escreva a função abaixo:
function MouseShowCursor(const Show: boolean): boolean;
var
I: integer;
begin
I := ShowCursor(LongBool(true));
if Show then begin
Result := I >= 0;
while I < 0 do begin
Result := ShowCursor(LongBool(true)) >= 0;
Inc(I);
end;
end else begin
Result := I < 0;
while I >= 0 do begin
Result := ShowCursor(LongBool(false)) < 0;
Dec(I);
end;
end;
end;
- Exemplos de uso:
MouseShowCursor(false); { Oculta o cursor }
MouseShowCursor(true); { Exibe o cursor }implemente as chamadas antes e depois do FOR
abraço
Diogo
GOSTEI 0