Shift Scroll
05/01/2006
0
Pessoal, coloquei o codigo abaixao para usar o [b:fb06e291a3]Scroll do Mouse + o shift[/b:fb06e291a3] para aumentar e diminuir a fonte do meu RichEdit.
Como faço para qdo o codigo acima for executado, a rolagem do richedit ficar parada???
Abraços
procedure TFMainView.RchEdtMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); begin if ssShift in Shift then begin if WheelDelta > 0 then begin RchEdt.Font.Size := RchEdt.Font.Size +1; end else if WheelDelta < 0 then begin RchEdt.Font.Size := RchEdt.Font.Size -1; end; end; end;
Como faço para qdo o codigo acima for executado, a rolagem do richedit ficar parada???
Abraços
Aloizio Castro
Curtir tópico
+ 0
Responder
Posts
05/01/2006
Michael
Use o parâmetro [b:84c942a3cd]Handled [/b:84c942a3cd]do evento [b:84c942a3cd]TMouseWheelEvent[/b:84c942a3cd]:
[]´s
procedure TFMainView.RchEdtMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); begin if ssShift in Shift then begin if WheelDelta > 0 then RchEdt.Font.Size := RchEdt.Font.Size +1 else if WheelDelta < 0 then RchEdt.Font.Size := RchEdt.Font.Size -1; Handled := True; // Adicione isso aqui end; end;
[]´s
Responder
Clique aqui para fazer login e interagir na Comunidade :)