Recent

Author Topic: Change Groupbox border color  (Read 1745 times)

Hansvb

  • Hero Member
  • *****
  • Posts: 820
Change Groupbox border color
« on: August 25, 2021, 10:02:31 pm »
Hi,

Is it possible to change the grey groupbox border color?

madref

  • Hero Member
  • *****
  • Posts: 1104
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Change Groupbox border color
« Reply #1 on: August 25, 2021, 10:09:27 pm »
Do a search on this forum and see what you get.


Suggestion: search for "GroupBox Color"
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Sonoma 14.7.4
Lazarus 4.99 (rev main_4_99-1378-ga4855f6fa5) FPC 3.3.1 x86_64-darwin-cocoa

Windows 10 Pro
Lazarus 3.99 (rev cbfd80ce39)

Soner

  • Sr. Member
  • ****
  • Posts: 319
Re: Change Groupbox border color
« Reply #2 on: August 25, 2021, 10:36:48 pm »
No you can't, but can take TPanel and change its BevelColor-property. It looks better.
Look also for TPanel.BorderSpacing.Around property.

wp

  • Hero Member
  • *****
  • Posts: 12867
Re: Change Groupbox border color
« Reply #3 on: August 25, 2021, 10:48:57 pm »
Is it possible to change the grey groupbox border color?
Be careful if you plan to make your project cross-platform. There are themes in Linux in which the groupbox has no border at all...

Hansvb

  • Hero Member
  • *****
  • Posts: 820
Re: Change Groupbox border color
« Reply #4 on: August 25, 2021, 11:21:57 pm »
@ madref, i searched with google and found some Delphi answers which wheren’t what I was hoping for.

@wp, i only use/plan to make my apps for windows. I try to make my working life easier with my hobby apps. And that is windows only (so far).
But thanks for the warning.

@ Sonar, i didn’t tought about using a panel. Thanks for the idea.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Change Groupbox border color
« Reply #5 on: August 25, 2021, 11:33:09 pm »
Hi!

Yes - use a Panel instead of a Groupbox.

A Panel owns a public (published?) canvas.
And an onPaint event.

With those two things you can design your panel as you like.
With a fuchsia bevel (outsch!)
Or a gradient as background.


The groupbox is bothering limited in their graphic options.
Replace it by a panel.


Winni

madref

  • Hero Member
  • *****
  • Posts: 1104
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Change Groupbox border color
« Reply #6 on: August 26, 2021, 05:54:03 am »
Or use ATFlatControls and use ATGroups :)
And create something like this
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Sonoma 14.7.4
Lazarus 4.99 (rev main_4_99-1378-ga4855f6fa5) FPC 3.3.1 x86_64-darwin-cocoa

Windows 10 Pro
Lazarus 3.99 (rev cbfd80ce39)

 

TinyPortal © 2005-2018