[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 551
  • Last Modified:

Change colour of scrollbar

How to change the colour of delphi scrollbar?

simple as possible.
0
966
Asked:
966
  • 2
1 Solution
 
FactorBCommented:
As per: http://www.delphipages.com/forum/showthread.php?t=69467

uses
flatsb, commctrl;

procedure TForm1.FormShow(Sender: TObject);
begin
InitializeFlatSB(ListBox1.Handle);
FlatSB_SetScrollProp(ListBox1.Handle,
WSB_PROP_HSTYLE or WSB_PROP_VSTYLE, FSB_FLAT_MODE,
True);
FlatSB_SetScrollProp(ListBox1.Handle,
WSB_PROP_HBKGCOLOR, ColorToRGB(clRed), True);
FlatSB_SetScrollProp(ListBox1.Handle,
WSB_PROP_VBKGCOLOR, ColorToRGB(clBlue), True);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnInitializeFlatSB(ListBox1.Handle);
end;

// Hopefully this is what you want.
// Regards,
// B.
0
 
966Author Commented:
its on the lines, but its still grey to look at. It needs to not be grey at all but blue or red.
0
 
966Author Commented:
even a custom component will do like a scrollbox
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now