EtheaDev / StyledComponents

Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!
Apache License 2.0
152 stars 34 forks source link

TStyledButton issue #15

Closed ASOFTSRL closed 5 months ago

ASOFTSRL commented 6 months ago

Good morning Carlo, I was trying your components before replacing some of the ones I currently use under certain circumstances.

TStyledButton: Would it not be possible to introduce the TRANSPARENT property as for TStyledSpeedButton or TStyledGraphicButton ?

For all the button types mentioned in the line above:

I solved it by forcing the caption:='' in create event of the form but couldn't you register the change in the .dfm so that even at runtime it reads that information directly ?

Thanks

Alberto

carloBarazzetta commented 6 months ago

Hello Alberto, the Transparent property is already present in TStyledGraphicButton (default false) and TStyledSpeedButton (default True). For the Problem with Caption and the Action I'll investigate: I'm sure in past works, it's probably an error introduced in the last version...

ASOFTSRL commented 6 months ago

Hi Carlo, ...I would like the Transparent property also be introduced in TStyledButton ...is it possible ?

carloBarazzetta commented 6 months ago

I've made some tests with Caption, but it seems that also standard TButton, TBitBtn and TSpeedButtons restore the Caption... The only way is to store a "blank" caption using a single space, so in the dfm the Capion = ' ' is stored and at runtime is used instead of Action Caption...

ASOFTSRL commented 6 months ago

...and you can't extend the Transparent property to TStyledButton as well like TStyledGraphicButton and TStyledSpeedButton

carloBarazzetta commented 6 months ago

No because in Delphi a transparent component can be only a "graphic" component: StyledButton inherits from a TCustomControl, that cannot be transparent, having a Windows Handle... This is the main difference from TStyledButton and TStyledGraphicButton. You can use TStyledGraphicButton but you loose TabStop capability...

ASOFTSRL commented 6 months ago

Good morning Carlo, I would like to ask, if it is possible for you, add a futures in a next release a property ShowCaption (true/false) in TStyledSpeedButton and in the other StyledButton ( TStyledToolbar has ShowCaption property ) that disables the caption display without put '' in the caption at runtime.

carloBarazzetta commented 6 months ago

Added to actual 3.4.5 version, give me a feedback if it works fine...

ASOFTSRL commented 5 months ago

Good morning Carlo, yes ! ...it work fine.

I appreciate your work and support.

Thanks Alberto