Grid - Registered Users - Helpdesk
Is there a way to determine when a Hint can overlap the ProfGrid, or...
Thread Starter: cyman73 Started: 8/16/2007 9:44 PM UTC
Replies: 3
Is there a way to determine when a Hint can overlap the ProfGrid, or...

Hello,

I am using v3.4.3.15 and I am experiencing issues with the ProfGrid component in the following way.

When the ProfGrid data is refreshed I call ProfGrid1.EnableControls; at the end of the update procedure.  If the mouse cursor hovers over another object (while the update is taking place) which then displays its Hint "window" and the Hint overlaps the ProfGrid, I get an exception at the following line immediately as I move the cursor over the ProfGrid space: 

function TProfGridCell.GetGrid: TProfGrid;
begin
  Result := TProfGridDualCollection(Collection).FOwner;
end;

ProfGrid1.MouseMove doesn't even have a chace to execute because this event is before it.  I have also determined that Collection is not Assigned when the exception occurs.  The exception does not occur if I turn off all hints.  I mentioned ProfGrid1.EnableControls above, and I call ProfGridDisableControls when I begin the update, because I want to know when EnableControls is finished executing.  Is there a way to find this out?  I mention these procedures because I am suspicious that they might be the culprit.  The error does not occur if these calls are not made during the ProfGrid updates.

I guess I ultimately would like to know if there is a ProfGrid state that can be tested in order for me to know if ShowHint can be True. 

Any ideas are greatly appreciated.
Thank you.

Re: Is there a way to determine when a Hint can overlap the ProfGrid, or...



Please delete the previous .zip file, I incorrectly uploaded the wrong file.  Here is the correct file.

Sorry.

This message includes the following attachments:

Re: Is there a way to determine when a Hint can overlap the ProfGrid, or...

I discovered that the ProfGrid bug might be related to the ShowHint property.

In testing, I have found that if ProfGrid1.ShowHint := False, the exception does not occur.  If I set ShowHint to True, I definitely see the bug. 

How can I determine when I can set the ShowHint property to True?  I have many instances where I don't need to show a hint from the ProfGrid, so the bug does not affect me.  Unfortunately, I do have instances where the Hint needs to be displayed, so now I am back to square one.

Any help or suggestions are greatly appreciated.

Thank you.

Re: Is there a way to determine when a Hint can overlap the ProfGrid, or...
Hello cyman73,

After a few days of testing, I have not been able to reproduce the exception - even with your exe.

However: try to remove the line
     Application.ProcessMessages;
from the loop in your project.

Also, it is always a good idea to use the latest public release version of ProfGrid, since it will contain the most recent fixes.


-Nicholas