mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 04:37:15 +01:00
win32 interface: implemented setting listview.font.color (bug #8773)
git-svn-id: trunk@11807 -
This commit is contained in:
parent
3c7d2a9d84
commit
31a2d5bbb8
@ -34,7 +34,7 @@ uses
|
||||
ImgList, StdCtrls,
|
||||
LCLProc, InterfaceBase,
|
||||
// widgetset
|
||||
WSComCtrls, WSLCLClasses, WSProc,
|
||||
WSComCtrls, WSLCLClasses, WSControls, WSProc,
|
||||
// win32 widgetset
|
||||
Win32Int, Win32Proc, Win32WSControls;
|
||||
|
||||
@ -132,6 +132,7 @@ type
|
||||
|
||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
||||
class procedure SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer); override;
|
||||
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
|
||||
class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); override;
|
||||
class procedure SetHoverTime(const ALV: TCustomListView; const AValue: Integer); override;
|
||||
// class procedure SetIconOptions(const ALV: TCustomListView; const AValue: TIconOptions); override;
|
||||
|
||||
@ -464,6 +464,8 @@ end;
|
||||
|
||||
class procedure TWin32WSWinControl.SetFont(const AWinControl: TWinControl; const AFont: TFont);
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetFont')
|
||||
then Exit;
|
||||
Windows.SendMessage(AWinControl.Handle, WM_SETFONT, Windows.WParam(AFont.Handle), 1);
|
||||
end;
|
||||
|
||||
|
||||
@ -628,6 +628,15 @@ begin
|
||||
// TODO ???
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.SetFont(const AWinControl: TWinControl;
|
||||
const AFont: TFont);
|
||||
begin
|
||||
// call inherited SetFont; need to do it this way,
|
||||
// because the compile time ancestor class is TWSCustomListView
|
||||
TWSWinControlClass(ClassParent).SetFont(AWinControl, AFont);
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETTEXTCOLOR, 0, AFont.Color);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles);
|
||||
const
|
||||
MASK = LVS_EX_ONECLICKACTIVATE or LVS_EX_TWOCLICKACTIVATE or LVS_EX_UNDERLINEHOT or LVS_EX_UNDERLINECOLD;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user