Lazarus

Miscellaneous => Suggestions => LCL => Topic started by: Gald on October 25, 2020, 04:12:00 pm

Title: Some Properties to TPanel (so much needed)
Post by: Gald on October 25, 2020, 04:12:00 pm
Actual:
BevelColor
BevelInner
BevelOuter
BevelWidth

Improved:
BevelInner
BevelInnerWidth
BevelInnerColor

BevelOuter
BevelOuterWidth
BevelOuterColor

There's only one Color and Width to both, Inner and Outer, so they are mixing together.
This little improvement will change everything!

---

An additional request is that we have BevelStyles bvLowered, bvNone, bvRaised and bvSpace.
Honestly, I can't see the difference between them. Sorry.  :-[

It's possible to add bvShadow and bvGlow?
Title: Re: Some Properties to TPanel (so much needed)
Post by: Blaazen on October 25, 2020, 04:53:48 pm
@ Honestly, I can't see the difference between them. Sorry.

They make different visual 3D effects in combination:

BevelOuterBevelInnerEffect
bvRaisedbvNoneraised box (default)
bvLoweredbvNonelowered box
bvRaisedbvLoweredraised frame
bvLoweredbvRaisedlowered frame

See also TBevel. It can draw simiral bevels but it is not a container.
Title: Re: Some Properties to TPanel (so much needed)
Post by: AlexTP on October 25, 2020, 05:56:04 pm
So you suggest to add

BevelInnerWidth
BevelInnerColor

BevelOuterWidth
BevelOuterColor
?
I do not agree, they are very rarely needed, do this painting in OnPaint.
Title: Re: Some Properties to TPanel (so much needed)
Post by: lainz on October 25, 2020, 05:58:06 pm
Create your own custom panel, is hard to modify old code that is supposed to work in a retro compatible way.
Title: Re: Some Properties to TPanel (so much needed)
Post by: Gald on October 25, 2020, 06:42:12 pm
Quote
They make different visual 3D effects in combination

Okay, it seems to work only when BevelColor is clDefault.

Quote
See also TBevel. It can draw similar Bevels but it is not a container.

I saw that, but TBevel doesn't have colors while TShape doesn't have TopLine, BottonLine, LeftLine and RightLine, like a TBevel.
And like you said, it is not a container.

The real good thing should be a TPanel with:

BevelTopInner
BevelTopInnerWidth
BevelTopInnerColor

BevelTopOuter
BevelTopOuterWidth
BevelTopOuterColor

BevelLeftInner
BevelLeftInnerWidth
BevelLeftInnerColor

BevelLeftOuter
BevelLeftOuterWidth
BevelLeftOuterColor

BevelRightInner
BevelRightInnerWidth
BevelRightInnerColor

BevelRightOuter
BevelRightOuterWidth
BevelRightOuterColor

BevelBottomInner
BevelBottomInnerWidth
BevelBottomInnerColor

BevelBottomOuter
BevelBottomOuterWidth
BevelBottomOuterColor

I've made a quickie sample to demonstrate what I mean.
TinyPortal © 2005-2018