|
-
April 16th, 2001, 10:25 AM
#1
Flexgrid double-click
I am using a flexgrid countrol with one fixed row (row 0) and three fixed columns (col 0,1,2). I would like to take one action when a user double-clicks on a column header or another action when a user double-clicks on a row header. I am using the following code:
private Sub grd_DblClick()
If grd.Row = 0 then
If grd.TextMatrix(grd.Row, grd.Col) <> "" then
action 1 (grd.textMatrix(grd.Row, grd.Col))
End If
else
If grd.col = 0 then
action 2 (grd.textMatrix(grd.Row, grd.Col))
End If
End If
End Sub
However, when selecting a row header (actually column 0), the col value is 3... and when selecting a column header (actually row 0), the row value = 1. Does anyone know why this is? Is there any way to resolve this?
Thanks,
Ron
-
April 16th, 2001, 01:45 PM
#2
Re: Flexgrid double-click
I never noticed that before. Now I tried your sampple and was amazed by this behavior.
I found a solution. Use grd.MouseRow instead grd.Row
....
If grd.TextMatrix(grd.MouseRow, grd.MouseCol) <> "" then
Here is the code I tried
Private Sub grd_DblClick()
Dim iCol As Integer
Dim iRow As Integer
With grd
MsgBox .MouseRow & "-" & .MouseCol
End With
Iouri Boutchkine
[email protected]
-
April 16th, 2001, 01:45 PM
#3
Re: Flexgrid double-click
Anyone? Would love some help with this. Thanks.
-
April 16th, 2001, 01:53 PM
#4
Re: Flexgrid double-click
Perfect!! Thanks a lot. I appreciate your response!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|