mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 02:49:22 +02:00
Qt: Implemented scrollBy() for TCustomFrame
git-svn-id: trunk@15886 -
This commit is contained in:
parent
3693f2d51e
commit
a562835ecc
@ -63,6 +63,8 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
|
class procedure ScrollBy(const AWinControl: TScrollingWinControl;
|
||||||
|
const DeltaX, DeltaY: integer); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TQtWSFrame }
|
{ TQtWSFrame }
|
||||||
@ -388,6 +390,19 @@ begin
|
|||||||
Widget.viewport.scroll(-DeltaX, -DeltaY);
|
Widget.viewport.scroll(-DeltaX, -DeltaY);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TQtWSCustomFrame }
|
||||||
|
|
||||||
|
class procedure TQtWSCustomFrame.ScrollBy(
|
||||||
|
const AWinControl: TScrollingWinControl; const DeltaX, DeltaY: integer);
|
||||||
|
var
|
||||||
|
Widget: TQtWidget;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(AWinControl, 'ScollBy') then
|
||||||
|
Exit;
|
||||||
|
Widget := TQtWidget(AWinControl.Handle);
|
||||||
|
Widget.scroll(-DeltaX, -DeltaY);
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
@ -398,7 +413,7 @@ initialization
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// RegisterWSComponent(TScrollingWinControl, TQtWSScrollingWinControl);
|
// RegisterWSComponent(TScrollingWinControl, TQtWSScrollingWinControl);
|
||||||
RegisterWSComponent(TScrollBox, TQtWSScrollBox);
|
RegisterWSComponent(TScrollBox, TQtWSScrollBox);
|
||||||
// RegisterWSComponent(TCustomFrame, TQtWSCustomFrame);
|
RegisterWSComponent(TCustomFrame, TQtWSCustomFrame);
|
||||||
// RegisterWSComponent(TFrame, TQtWSFrame);
|
// RegisterWSComponent(TFrame, TQtWSFrame);
|
||||||
RegisterWSComponent(TCustomForm, TQtWSCustomForm);
|
RegisterWSComponent(TCustomForm, TQtWSCustomForm);
|
||||||
// RegisterWSComponent(TForm, TQtWSForm);
|
// RegisterWSComponent(TForm, TQtWSForm);
|
||||||
|
Loading…
Reference in New Issue
Block a user