Qt: Implemented scrollBy() for TCustomFrame

git-svn-id: trunk@15886 -
This commit is contained in:
zeljko 2008-07-27 09:22:42 +00:00
parent 3693f2d51e
commit a562835ecc

View File

@ -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);