mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-24 17:59:10 +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
|
||||
protected
|
||||
public
|
||||
class procedure ScrollBy(const AWinControl: TScrollingWinControl;
|
||||
const DeltaX, DeltaY: integer); override;
|
||||
end;
|
||||
|
||||
{ TQtWSFrame }
|
||||
@ -388,6 +390,19 @@ begin
|
||||
Widget.viewport.scroll(-DeltaX, -DeltaY);
|
||||
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
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@ -398,7 +413,7 @@ initialization
|
||||
////////////////////////////////////////////////////
|
||||
// RegisterWSComponent(TScrollingWinControl, TQtWSScrollingWinControl);
|
||||
RegisterWSComponent(TScrollBox, TQtWSScrollBox);
|
||||
// RegisterWSComponent(TCustomFrame, TQtWSCustomFrame);
|
||||
RegisterWSComponent(TCustomFrame, TQtWSCustomFrame);
|
||||
// RegisterWSComponent(TFrame, TQtWSFrame);
|
||||
RegisterWSComponent(TCustomForm, TQtWSCustomForm);
|
||||
// RegisterWSComponent(TForm, TQtWSForm);
|
||||
|
Loading…
Reference in New Issue
Block a user