Diego Bittencourt
Diego Bittencourt

Reputation: 605

How can I change the background color of a header from a TListView?

I need change the background color of all header of my listView for them to be highlighted. I found nothing on Object Inspector and nothing on Style Designer, can you guys give me some direction?

enter image description here

Upvotes: 1

Views: 2358

Answers (2)

Jay
Jay

Reputation: 66

Try this one, it worked for me. You can delete the Rectangle component.

  • right click the LV
  • edit custom style
  • select header
  • click on SourceLink property (...)
  • there you can either chose one of the existing colors, or create your own
  • close the BitmapLinks Editor
  • Close and save the Style Designer Should work

enter image description here

Upvotes: 1

Jay
Jay

Reputation: 66

Basically you need to place a Rectangle component inside the header item of your LV (ListView), then change its color accordingly. Here is how to accomplish it:

  • Your LV must be in Dynamic Appearance (I believe it already is)
  • Right click on you LV, and select Edit Custom Style
  • In the Style Container->expand your LV->expand Header
  • Drag a Rectangle component onto your LV header (MAKE SURE IT IS INSIDE THE HEADER item).
  • Set the desired fill color for the Rectangle.
  • Set its alignment to client
  • Close and save your Style Designer.

Should be working now

Upvotes: 1

Related Questions