[Gambas-user] System colors

Martín mbelmonte at belmotek.net
Fri May 5 11:28:44 CEST 2023


Hi,

I do the following to get the system colours, but it only works with the 
constants. How can I get the values of the following properties?

   Dim xColor As Class = Classes["Color"]
   Dim sSymbol As String

   For Each sSymbol In xColor.Symbols
     Select xColor[sSymbol].Kind
       Case Class.Constant
         $aColors.Add([xColor[sSymbol].Value, sSymbol])
       Case Class.Property
         Print "Property: " & sSymbol
       Case Class.Variable
         Print "Variable: " & sSymbol
     End Select
   Next

How I can obtain it in a simple way the default system colors?

Property: Background
Property: Foreground
Property: LinkForeground
Property: TextBackground
Property: TextForeground
Property: LightBackground
Property: LightForeground
Property: ButtonBackground
Property: ButtonForeground
Property: TooltipBackground
Property: TooltipForeground
Property: VisitedForeground
Property: SelectedBackground
Property: SelectedForeground

Thanks.

Martin.



More information about the User mailing list