Dear Rob, Thanks for the answer.
> Why don't you use a real tool tip? I can't control perfectly the tool-tip window. I want to make the tool tip to appear immediately after the mouse is moved over a new cell and to stay there long enough. I want also to avoid the flicker when the mouse switch from one cell to another and to wrap long text on multiple lines. > Don't make the panel a child of the grid. If I don't make the HNT child of TMyStringGrid (HNT.Parent:= self;) then the HNT will not appear at all on screen. constructor TMyStringGrid.Create; begin ... HNT:= TPanel.Create(Self); HNT.Visible := False; // HNT.Parent := self; HNT.BringToFront; HNT.Top := 30; ... end; Later, OnMouseMove I make the HNT visible. Rob Kennedy wrote: > CubicDesign wrote: > >> I use a small TPanel to simulate a tool tip for a TMyStringGrid (derived >> of course from TStringGrid). >> When the user moves the cursor over the cells I display information or >> content of the cell in this fake 'tool tip'. >> > > Why don't you use a real tool tip? > > >> I worked pretty well until I decide to move/integrate that 'tool tip' >> inside the TMyStringGrid component. Because the panel is now a child of >> TMyStringGrid it does not stay in top of it. More exactly, when I move >> the mouse on the last row, the tool tip is hidden bellow the scroll bar >> (yes, TMyStringGrid has a horizontal scroll bar). >> >> Anybody have any idea how can I keep on top of TMyStringGrid and its >> scroll bar? Of course, BringToFront don't work in this case. >> > > Don't make the panel a child of the grid. It shouldn't be a child of > anything since it needs to be able to extend beyond the bounds of the > main window, too. It needs to be a popup window, in Windows API terms. > > _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

