albert925 has asked for the wisdom of the Perl Monks concerning the following question:

Hey, I'm trying to get Tk scrollbars colored on Windows but they are remaining grey.

I made a small test program shown below, it shows colored scrollbars on Debian Linux with Perl 5.14.2 and perl-tk 804.030-1. (But on Windows8 with perl 5.26.0 strawberry perl the scrollbars remain grey). Any workaround to get them colored on Windows?

#!/usr/bin/perl use Tk; use Tk::Pane; $top = new MainWindow; $top->configure(-background=>'#333333',-title=>'test'); $top->geometry('300x300+100+200'); $select_windowS = $top->Scrolled('Frame', -scrollbars => 'e',-backgrou +nd=>'#171717')->pack(-expand=>'both',-fill=>'both'); my $ybar = $select_windowS->Subwidget('yscrollbar'); $ybar->configure(-troughcolor=>'#ff0000',-background=>'#ff0000',-highl +ightbackground=>'#0000ff',-activebackground=>'#00ffff'); for(1..40) { $select_windowS->Label(-text=>"test",-foreground=>'#ffffff',-back +ground=>'#000000')->pack(-side=>'top'); } MainLoop;

Replies are listed 'Best First'.
Re: Tk Scrollbars Color win32
by zentara (Cardinal) on Jun 12, 2017 at 16:00 UTC
      thanks, your name is cool :)
Re: Tk Scrollbars Color win32
by Anonymous Monk on Jun 12, 2017 at 22:15 UTC

      Good to know that is a missing feature on that platform, it explains why the -width was working but not the color options, thanks.

      Instead of coding up the missing feature I just assigned scrollbar to a variable, did a packForget to hide it, then bound mouse scroll wheel functionality to the area (which is now a "pane" instead of frame).