Форум: "Основная";
Текущий архив: 2002.04.08;
Скачать: [xml.tar.bz2];
ВнизРабота с TImage Найти похожие ветки
← →
MBo (2002-03-25 14:46) [3]ну вот это кое-как работает (Image в ScrollBox)
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if ssLeft in Shift then begin
x0:=x;y0:=x;
end;
end;
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if ssLeft in Shift then begin
if y<>y0 then scrollbox1.VertScrollBar.position:=
scrollbox1.VertScrollBar.position+(y0-y);
if x<>x0 then scrollbox1.HorzScrollBar.position:=
scrollbox1.HorzScrollBar.position+(x0-x);
label1.caption:=inttostr(scrollbox1.VertScrollBar.position);
end;
end;
procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if ssLeft in Shift then begin
x0:=x;y0:=x;
end;
end;
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.04.08;
Скачать: [xml.tar.bz2];
Память: 0.43 MB
Время: 0.147 c