EhLib.Com
https://forum.ehlib.com/en/

How to make another component capture and style the Hint of
https://forum.ehlib.com/en/viewtopic.php?f=5&t=1179
Page 1 of 1

Author:  Luciano_F [ 10 Oct 2022, 20:18 ]
Post subject:  How to make another component capture and style the Hint of

using the code you gave me in the topic
viewtopic.php?f=5&t=1177

The TLMDHint Component is able to capture and display a Hint as you can see in the attached image


Image

however when using the hint by the DataHintShow event as follows

Image


In TLMDHint cannot capture and I am shown a Hint that I believe to be generated by the Grid, would there be any way to make a hint as I did by the Footer of the grid so that TLMDHint can capture ?

Another thing is the code you sent me from the Topic
viewtopic.php?f=5&t=1177
are you going to leave it in your sources? so I don't have to change it when I get a new version of EhGrid ?

Author:  EhLibSupport [ 11 Oct 2022, 12:01 ]
Post subject:  Re: How to make another component capture and style the Hint

Hello Luciano

1.
Quote:
however when using the hint by the DataHintShow event as follows
In TLMDHint cannot capture and I am shown a Hint that I believe to be generated by the Grid, would there be any way to make a hint as I did by the Footer of the grid so that TLMDHint can capture ?

Try to comment code in the method TCustomDBGridEh.CMHintShow

Code:
procedure TCustomDBGridEh.CMHintShow(var Message: TCMHintShow);
...
  {$IFDEF CIL}
//-      w ith AHintInfo do
  {$ELSE}
  {$ENDIF}
      phi.HintWindowClass := THintWindowEh; //COMMENT THIS LINE
      phi.HintData := FHintFont;     //Perhaps this line should also be commented out.
    end;
{$IFDEF CIL}
    Message.HintInfo := AHintInfo;
{$ENDIF}
  end;
end;


2.
Quote:
Another thing is the code you sent me from the Topic
viewtopic.php?f=5&t=1177
are you going to leave it in your sources? so I don't have to change it when I get a new version of EhGrid ?


We often suggest that the client change the source codes of the library, but we do not leave the special code for the client in the general source for everyone. If we leave the code for each client, what will the source codes look like?
This will be a large number of inserts that will be difficult to read for our developers and other clients who do not need this code.
We also plan to add the Footer.Hint property to the next version of the library (10.3 or 11). So it will not be necessary to make changes to the source codes.

Author:  Luciano_F [ 11 Oct 2022, 12:55 ]
Post subject:  Re: How to make another component capture and style the Hint

Quote:
We often suggest that the client change the source codes of the library, but we do not leave the special code for the client in the general source for everyone. If we leave the code for each client, what will the source codes look like?


I agree with the colleague about having a custom code for each client is very complicated.

You could create a new property to identify if I want to draw the Hint by EhLib's internal system or by third-party components.
and within this event just check this property to know how to design the hints.

Author:  EhLibSupport [ 11 Oct 2022, 13:12 ]
Post subject:  Re: How to make another component capture and style the Hint

Hello

Before adding properties to identify internal or external tooltip overrides, we need to understand how external libraries override the tooltip window.
Can you make corrections to those described in the second message to see if the external tooltip window will work?

Author:  Luciano_F [ 11 Oct 2022, 14:34 ]
Post subject:  Re: How to make another component capture and style the Hint

EhLibSupport wrote:
Hello

Before adding properties to identify internal or external tooltip overrides, we need to understand how external libraries override the tooltip window.
Can you make corrections to those described in the second message to see if the external tooltip window will work?



Yes I already did the fix you suggested and it worked.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/