Reputation: 6053
In a Delphi 10.4 VCL Application, TCard
(as container-item of TCardPanel
) does not have public OnShow
and OnHide
events (like TTabSheet
has).
Therefore, the TCard.OnEnter
event-handler is NOT triggered when a specific TCard
is ACTIVATED. The TCard.OnEnter
event-handler is triggered ONLY when e.g. clicking on a control on the TCard
.
Example code:
CardPanel1.ActiveCard := Card2;
In this case, the TCard.OnEnter
event is NOT triggered!
Is it possible to upgrade the TCard
class with public OnShow
and OnHide
events? Or is it possible to simulate those events?
Upvotes: 1
Views: 289
Reputation: 47714
Use the OnCardChange event of TCardPanel and compare PrevCard and/or NextCard with your actual card instances.
Upvotes: 2