From a653ef8ca4b29f71be8176f15c8aa2a1701458b1 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 23 Jun 2024 15:58:03 +1200 Subject: [PATCH] main: get accurate cross-platform background colour for properties tab --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b0ef795..ff7cd5a 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "github.com/ying32/govcl/vcl" "github.com/ying32/govcl/vcl/types" + "github.com/ying32/govcl/vcl/types/colors" ) type TMainForm struct { @@ -137,8 +138,8 @@ func (f *TMainForm) OnFormCreate(sender vcl.IObject) { f.propertiesBox.BorderSpacing().SetAround(MY_SPACING) f.propertiesBox.SetAlign(types.AlClient) // fill remaining space f.propertiesBox.SetReadOnly(true) - f.propertiesBox.SetEnabled(true) // Need to leave it enabled so scrolling works - f.propertiesBox.SetColor(0x00f0f0f0) // TODO get accurate disabled colour from the OS + f.propertiesBox.SetEnabled(true) // Need to leave it enabled so scrolling works + f.propertiesBox.SetColor(colors.ClForm) // 0x00f0f0f0 f.propertiesBox.SetBorderStyle(types.BsNone) f.propertiesBox.SetScrollBars(types.SsAutoVertical)