Change scrollbar color

General TRichView support forum. Please post your questions here
Post Reply
a.mancini
Posts: 17
Joined: Tue Jan 16, 2024 3:35 pm

Change scrollbar color

Post by a.mancini »

Hello,

I would like to change the color of the scrollbar in some cases.
I tried using the RVFLATSCROLLBARS compilation directive, but I believe it is no longer supported.
Is there a way to change the color of the scrollbar?

Best regards,
Alessandro Mancini
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Change scrollbar color

Post by Sergey Tkachenko »

RVFLATSCROLLBARS is really an obsoleted feature. It can work only if the application does not use Windows themes, and I am not even sure that modern versions of Windows support it.

TRichView (unlike ScaleRichView) uses the standard scrollbars. This means you have only two options.

1. Using VCL themes - they change appearance of standard scrollbars. Some other third-party style engines can do it too.

2. Hide scrollbars in TRichView (properties VScrollVisible = HScrollVisible = False) and use some third-party scrollbar components
There is a demo how to use external scrollbars: https://www.trichview.com/support/files/extscroll.zip (it's old but still should work).
Post Reply