Page 1 of 1

Change scrollbar color

Posted: Fri Jul 05, 2024 11:40 pm
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

Re: Change scrollbar color

Posted: Sat Jul 06, 2024 8:38 am
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).