1

Possible Duplicate:
Changing color of scroll bar in ListView in WinForms

I am trying to change default colors of a scroll bars for a listview in my desktop application. I guess it can be done through inheariting from default class. Would you mind giving some code or tips?

Community
  • 1
  • 1
Dumbo
  • 13,555
  • 54
  • 184
  • 288
  • duplicate of http://stackoverflow.com/questions/4397025/changing-color-of-scroll-bar-in-listview-in-winforms – Bala R Mar 19 '11 at 14:31
  • 2
    It can't. Scrollbars are one of the *hard* window adornments to custom-draw, the native Windows controls do not support it at all. You'll always get them in the colors selected by the user's preferred theme. Which, well, the user prefers. – Hans Passant Mar 19 '11 at 14:34
  • Check my answer that proposes an alternative workaround to replace the default controls ScrollBar with custom ones https://stackoverflow.com/a/73613569/5514131 – Ahmed Osama Sep 05 '22 at 18:55

1 Answers1

1

Please check this Changing color of scroll bar in ListView in WinForms

Another way is to make your listview in a WPF control, wpf allows scrollbar customization, look here http://www.c-sharpcorner.com/UploadFile/mahesh/SBar06292009105859AM/SBar.aspx

Community
  • 1
  • 1
Stefan P.
  • 9,489
  • 6
  • 29
  • 43