Data Grid and Tool Tip 
Author Message
 Data Grid and Tool Tip

I'm having a little problem with the datagrid.

If you start going up the datagrid from the bottom of the grid, the
tooltips will be off by one row (the same thing doesn't seem to be
happening when you start from the top of the grid).  Since the tooltips
are off, it means that the setting of RowMark and ColumnMark (global
variables) are also off by one row, which results in our right-click menus
using the wrong cell.

Any ideas?

Allan

Here is the mouse move event (I don't think that RowContaining is
returning the right row, even):

Private Sub dbgResultsPane_MouseMove(Button As Integer, Shift As Integer,
_
   X As Single, Y As Single)
   Dim Row As Long, col As Long
   On Error Resume Next
   Row = dbgResultsPane.RowContaining(Y)
   col = dbgResultsPane.ColContaining(X)
   If Row >= 0 And col >= 0 Then
      dbgResultsPane.ToolTipText = dbgResultsPane.Columns(col).CellValue _
        (dbgResultsPane.RowBookmark(Row))
   Else
      dbgResultsPane.ToolTipText = ""
   End If
   RowMark = Row
   ColumnMark = col

End Sub

Here is mousedown, for the same grid:

Private Sub dbgResultsPane_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
If Button = 2 Then  ' right-click
  If Not gridRs.EOF Then
  If ColumnMark <> -1 And RowMark > -1 Then
  If Not IsNull(dbgResultsPane.Columns(ColumnMark).CellValue _
     (dbgResultsPane.RowBookmark(RowMark))) Then
  Call ShowCxtMenu(Button, BUCKET_ELEVATOR)
End If
End If
End If
End If
End Sub

Thanks in Advance,
Allan



Tue, 14 Sep 2004 06:20:31 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Data Grid and Tool Tip

2. Sleepy data tool-tips

3. web based grid tool for data management

4. Tool (tip) Time!

5. Changing embedded button tool tips

6. Shape tool tip text --- is it available?

7. How to determine the tool tip

8. tool tips running off edge of userform and not refreshing

9. tool tips on class methods, properties, etc.

10. How can I add tool tip to userdefined classes,Datatypes,Function Etc in Vb.net

11. Hand Made tool tip

12. Using tool tips

 

 
Powered by phpBB® Forum Software