Qt: TQtWSCustomListView - implemented SetScrollBars()

git-svn-id: trunk@21450 -
This commit is contained in:
zeljko 2009-08-26 09:07:05 +00:00
parent 47b2237b69
commit 3aeb9f6f61

View File

@ -33,7 +33,8 @@ uses
qt4,
qtwidgets, qtprivate, qtobjects, qtproc, qtwscontrols,
// LCL
SysUtils, Classes, Types, ComCtrls, Controls, LCLType, Graphics, LCLProc, LCLIntf, Forms,
SysUtils, Classes, Types, ComCtrls, Controls, LCLType, Graphics, StdCtrls,
LCLProc, LCLIntf, Forms,
// Widgetset
WSProc, WSComCtrls, WSLCLClasses;
@ -111,6 +112,8 @@ type
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
(*
// Column
@ -1305,4 +1308,18 @@ begin
SetProperty(ALV, i, i in AProps);
end;
class procedure TQtWSCustomListView.SetScrollBars(const ALV: TCustomListView;
const AValue: TScrollStyle);
var
QtTreeWidget: TQtTreeWidget;
begin
if not WSCheckHandleAllocated(ALV, 'SetScrollBars') then
Exit;
QtTreeWidget := TQtTreeWidget(ALV.Handle);
{always reset before applying new TScrollStyle}
QtTreeWidget.setScrollStyle(ssNone);
if AValue <> ssNone then
QtTreeWidget.setScrollStyle(AValue);
end;
end.