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

when casting buttons to TComponent, the tag field is always 0 #34

Closed marcuscde closed 2 months ago

marcuscde commented 2 months ago

The buttons are not returning the correct 'tag', when they are casted to TComponent or TWinControl.

carloBarazzetta commented 2 months ago

Sorry, you can fix adding those two lines:

procedure TCustomStyledGraphicButton.SetTag(const AValue: Integer);
begin
  inherited Tag := AValue; //add this one
  FRender.Tag := AValue;
end;
procedure TCustomStyledButton.SetTag(const AValue: Integer);
begin
  inherited Tag := AValue; //add this one
  FRender.Tag := AValue;
end;

It will be fixed in the next release...

marcuscde commented 2 months ago

Thanks it works

From: Carlo Barazzetta @.> Sent: Wednesday, August 14, 2024 12:16 AM To: EtheaDev/StyledComponents @.> Cc: marcuscde @.>; Author @.> Subject: Re: [EtheaDev/StyledComponents] when casting buttons to TComponent, the tag field is always 0 (Issue #34)

Sorry, you can fix adding those two lines:

procedure TCustomStyledGraphicButton.SetTag(const AValue: Integer); begin inherited Tag := AValue; //add this one FRender.Tag := AValue; end; procedure TCustomStyledButton.SetTag(const AValue: Integer); begin inherited Tag := AValue; //add this one FRender.Tag := AValue; end;

It will be fixed in the next release...

— Reply to this email directly, view it on GitHub https://github.com/EtheaDev/StyledComponents/issues/34#issuecomment-2288020498 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BBZYOIYPDIVRTMA4U3PY2TTZRL73BAVCNFSM6AAAAABMO5XKISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGAZDANBZHA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BBZYOI5LPECD6BOX4TGJ4S3ZRL73BA5CNFSM6AAAAABMO5XKISWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUIMBWBE.gif Message ID: @. @.> >

marcuscde commented 2 months ago

There was also code my boss pushed to fix the sorting of the menu bar, it was going out of order, he is with CDE software as well. Could you also integrate that fix into the next release?

From: Carlo Barazzetta @.> Sent: Wednesday, August 14, 2024 12:16 AM To: EtheaDev/StyledComponents @.> Cc: marcuscde @.>; Author @.> Subject: Re: [EtheaDev/StyledComponents] when casting buttons to TComponent, the tag field is always 0 (Issue #34)

Sorry, you can fix adding those two lines:

procedure TCustomStyledGraphicButton.SetTag(const AValue: Integer); begin inherited Tag := AValue; //add this one FRender.Tag := AValue; end; procedure TCustomStyledButton.SetTag(const AValue: Integer); begin inherited Tag := AValue; //add this one FRender.Tag := AValue; end;

It will be fixed in the next release...

— Reply to this email directly, view it on GitHub https://github.com/EtheaDev/StyledComponents/issues/34#issuecomment-2288020498 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BBZYOIYPDIVRTMA4U3PY2TTZRL73BAVCNFSM6AAAAABMO5XKISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGAZDANBZHA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BBZYOI5LPECD6BOX4TGJ4S3ZRL73BA5CNFSM6AAAAABMO5XKISWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUIMBWBE.gif Message ID: @. @.> >

carloBarazzetta commented 2 months ago

Fixed in 3.6.3 version. The code for Sorting Order of StyledToolButton was added, with some differences