mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 00:58:17 +02:00
win32: implement color applying for TStatusBar (bug #0012560)
git-svn-id: trunk@18419 -
This commit is contained in:
parent
463fc295c5
commit
a1ea9760c4
@ -49,6 +49,7 @@ type
|
||||
const AParams: TCreateParams): HWND; override;
|
||||
class procedure Update(const AStatusBar: TStatusBar); override;
|
||||
class procedure PanelUpdate(const AStatusBar: TStatusBar; PanelIndex: integer); override;
|
||||
class procedure SetColor(const AWinControl: TWinControl); override;
|
||||
class procedure SetPanelText(const AStatusBar: TStatusBar; PanelIndex: integer); override;
|
||||
class procedure SetSizeGrip(const AStatusBar: TStatusBar; SizeGrip: Boolean); override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||
@ -385,6 +386,13 @@ begin
|
||||
UpdateStatusBarPanel(AStatusBar.Panels[PanelIndex]);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSStatusBar.SetColor(const AWinControl: TWinControl);
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'TWin32WSStatusBar.SetColor') then
|
||||
Exit;
|
||||
Windows.SendMessage(AWinControl.Handle, SB_SETBKCOLOR, 0, ColorToRGB(AWinControl.Color));
|
||||
end;
|
||||
|
||||
class procedure TWin32WSStatusBar.GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);
|
||||
begin
|
||||
|
@ -682,8 +682,8 @@ class procedure TWin32WSCustomListView.SetColor(const AWinControl: TWinControl);
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'TWin32WSCustomListView.SetColor') then
|
||||
Exit;
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETBKCOLOR, 0, AWinControl.Color);
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETTEXTBKCOLOR, 0, AWinControl.Color);
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETBKCOLOR, 0, ColorToRGB(AWinControl.Color));
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETTEXTBKCOLOR, 0, ColorToRGB(AWinControl.Color));
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer);
|
||||
@ -700,7 +700,7 @@ 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);
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETTEXTCOLOR, 0, ColorToRGB(AFont.Color));
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles);
|
||||
|
Loading…
Reference in New Issue
Block a user