Hi,
I would like to show an UltraWinGrid contents which are not editable, as a tooltip to another UltraWinGrid[called as "Parent Grid"] cell mouse hover. Also the tooltip should be inside the Parent Grid's boundary. Is there any way to implement this? Or is there any way to acheive tooltip looks like Grid structure? Please help me.
Thanks & Regards,
Sabeer
Hi Sabeer,
Yes, I think that could still work. There's no way to assign a tooltip to part of a control, though. Tooltips are control-based.
So you would have to change the Tooltip of the grid based on the current location of the mouse. Here's a KB article with some sample code to determine what cell (if any) the mouse is currently over in the grid.
HOWTO:UltraWinGrid Mouse Position and Cell Identification
The only problem I foresee here is one of performance. If you are using the MouseMove event of the grid to generate another grid and paint that grid onto a Bitmap every time, it might slow things down a bit. But if your machine is pretty fast and the tooltip grid is pretty small, I think it should be doable.
HI Mike,
Thanks for your answer.
I forgot to mention, the Second Grid is a dynamic one. The second grid will be based on the cell. If you mouseover a cell the content of the second grid will be generated and will be shown as a tooltip. Can we achieve this the way which you suggest here?
Thanks,
There's no way to directly place a WinGrid into a tooltip. But you might be able to fake it.
What you could do is create a second WinGrid and set it up with data and initialize it to how you want it to look. Then, you could use the DrawToBitmap method (which is a method on Control and so therefore exist on the grid) to draw the grid into a Bitmap. Then you could use UltraToolTipManager to display a tooltip with the image of the grid.