Tlistbox, won't highligt selected item lazarus / 31-LCL ---------------------------------------------------------------------- hakelm · 2018-12-21 14:50 When I do ListBox1.Selected[n]:=true; there is only a slight hardly perceptible colour change of the actual item. If I, however, click on the item with the mouse or move the selection with the up and down keys it is highlighted with a very clear colour change. How do I accomplish this in code? H ---------------------------------------------------------------------- flowCRANE · 2018-12-21 15:57 Maybe the color is slight because the control has no focus. This behavior is theme-depending—when the control has focus, the color is strong (eg blue). If not, can has the same strong color (eg blue), barely visible (eg light gray) or even the same as background (eg white). Clicking on the control automatically moves the focus to it and repaint the content. Check it. ---------------------------------------------------------------------- lucamar · 2018-12-21 16:14 Note also that there may be rendering differences between selected items and the current item (the one pointed to by ItemIndex). This all depends on the current theme, as "furious programming" said. ---------------------------------------------------------------------- jamie · 2018-12-21 22:00 You will need to do owner draw type of list box so you can select your colors per state.