FMouseDown: Boolean; // Mouse 가 눌렸는지 확인
FMouseDown_Y: Single; // Mouse Down 되었을 때의 Y 의 값
procedure TfrmMain.Memo1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
FMouseDown := True;
FMouseDown_Y := Y;
end;
procedure TfrmMain.Memo1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single);
begin
if FMouseDown then
VertScrollBox1.ViewportPosition := PointF(X, VertScrollBox1.ViewportPosition.Y + FMouseDown_Y - Y);
end;
procedure TfrmMain.Memo1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
begin
FMouseDown := False;
end;
- 이상 -
'델파이 > 델파이관련' 카테고리의 다른 글
FireMonkey Delphi component 설치하기 (0) | 2024.08.29 |
---|---|
Listbox Drag & Drop (0) | 2017.09.29 |
ComboBox 두 개의 값 입력하기 (0) | 2017.09.11 |
Delphi-윈도우-메세지를-받아먹는-3가지-방법 (0) | 2017.08.30 |
reference to procedure, reintroduce (0) | 2017.08.30 |