Recent

Author Topic: scrollbox corner color  (Read 1676 times)

scribly

  • Jr. Member
  • **
  • Posts: 77
scrollbox corner color
« on: February 18, 2021, 02:32:30 pm »
I'm wondering if there is a way to change the color of the corner(bottom right) scrollboxes like the ones used in Tmemo and TScrollbox

Handoko

  • Hero Member
  • *****
  • Posts: 4383
  • My goal: build my own game engine using Lazarus
Re: scrollbox corner color
« Reply #1 on: February 18, 2021, 03:34:48 pm »
You can't, that is OS/theme/widgetset depended component.

But programmers like to make impossible things become possible. Hey, changing the corner color is easy at least on GTK2. See the image below, I changed it to red.

Just put a TShape on there and don't forget to set the Pen.Color := clNone or the same color as brush color.

scribly

  • Jr. Member
  • **
  • Posts: 77
Re: scrollbox corner color
« Reply #2 on: February 18, 2021, 05:45:04 pm »
I guess that's an option.  But I'll use a borderless panel instead as TShape on windows is always a background object. It can't get in front of a scrollbox

Handoko

  • Hero Member
  • *****
  • Posts: 4383
  • My goal: build my own game engine using Lazarus
Re: scrollbox corner color
« Reply #3 on: February 18, 2021, 06:06:37 pm »
... always a background object. It can't get in front of a scrollbox

Have you tried to set its z-order? On the form designer > right click on the panel (or shape or what you want to put it front) > Z-order > Move to Front. Alternatively, if you use a TShape you can set the color to clDefault or clForm.
« Last Edit: February 18, 2021, 06:09:19 pm by Handoko »

 

TinyPortal © 2005-2018