Reputation: 202088
How can one make use of TReader.OnFindComponentClass
? TReader
creation is hard-coded in TStream.ReadComponent
. I do not see a place, where one can hook the event.
TStream.ReadComponent
is not virtual. And even if it were, if one had to derive TStream
, one can as well derive TReader
directly and the OnFindComponentClass
won't be of much use. I believe that must be some easy way to hook the event, otherwise the even would not make must sense. But I cannot identify it.
The reason I'm asking is the answer by @DavidHeffernan to:
TLabel displays accelerator keys even when the UI state says not to.
I make sure that I always create
TUIStateAwareLabel
rather thanTLabel
by hooking the form streaming mechanism withTReader.OnFindComponentClass
.
Upvotes: 1
Views: 62