I am trying to temporarily change the hint text at runtime inside a component, without changing the Hint property itself.
I tried to catch CM_SHOWHINT , but this event seems to be only of the form, but not of the component itself.
CustomHint insertion doesnβt really work because it accepts text from the Hint property.
my component is a descendant of TCustomPanel
Here is what I am trying to do:
procedure TImageBtn.WndProc(var Message: TMessage); begin if (Message.Msg = CM_HINTSHOW) then PHintInfo(Message.LParam)^.HintStr := 'CustomHint'; end;
I found this code somewhere on the Internet, unfortunately, it does not work.
source share