Delphi XE6 How to change highlight color of TMetropolisUIListBoxItem using style
1 answer
Color definition can be done using a style file. You can search by style ListBoxItemStyle
, and inside it you will find TColorAnimation
which has Trigger = IsSelected
, there you can change the color. I am setting my style example:
object TLayout
StyleName = 'ListBoxItemStyle'
DesignVisible = False
Height = 20.000000000000000000
Width = 50.000000000000000000
object TText
StyleName = 'text'
Align = alClient
Color = claBlack
Height = 18.000000000000000000
HitTest = False
HorzTextAlign = taLeading
Margins.Left = 3.000000000000000000
Margins.Top = 1.000000000000000000
Margins.Right = 3.000000000000000000
Margins.Bottom = 1.000000000000000000
Width = 44.000000000000000000
WordWrap = False
object TColorAnimation
Duration = 0.001000000047497451
PropertyName = 'Color'
StartValue = claBlack
StopValue = claAzure
Trigger = 'IsSelected=true'
TriggerInverse = 'IsSelected=false'
end
end
object TCheckBox
StyleName = 'check'
Align = alLeft
CanFocus = False
DisableFocusEffect = True
Height = 20.000000000000000000
StyleLookup = 'ListBoxItemcheck'
TabOrder = 1
Visible = False
Width = 20.000000000000000000
end
end
+3
source to share