Glowing Vista listview or treeview selection background lazarus / 39-Graphics ---------------------------------------------------------------------- tk · 2010-11-06 19:11 Hello I don't know how to paint this nice glowing selection with the Vista theme API (both in Lazarus and Delphi). Delphi XE has this in some of their own controls but I don't have VCL source yet. If anyone knows, thanks for help in advance. tk ---------------------------------------------------------------------- typo · 2010-11-06 19:21 It is not possible to post copyrighted code here. ---------------------------------------------------------------------- Ocye · 2010-11-07 05:35 You can use themed controls: http://wiki.freepascal.org/Theme_library. I found an article about themed controls in the very interesting journal BlaisePascal, #5 - free available on their homepage http://www.blaisepascal.eu/. It was easy to adopt to tables and listviews. ---------------------------------------------------------------------- tk · 2010-11-07 09:39 My friend figured it out and sent me the code: Code: [Select]  var ATheme: HTHEME; ATheme := ThemeServices.Theme[teMenu]; DrawThemeBackground(ATheme, Canvas.Handle, MENU_POPUPITEM, MPI_HOT, Rect, nil); ---------------------------------------------------------------------- Ocye · 2010-11-08 06:51 Don't forget to test whether or not themes are enabled: "if ThemeServices.ThemesEnabled then...". This ensures also that themes are available at all. ---------------------------------------------------------------------- lainz · 2010-11-26 00:49 reported bug "0018053: Glowing Vista listview or treeview selection background" to improve lazarus list view.