lodem
09-01-2003, 03:40 PM
if my flexgrid has the focus, and the user hits tab, i want the next field of the flex to get the focus, and not the next control on the form, is this possible ?
Tab in Flexgridlodem 09-01-2003, 03:40 PM if my flexgrid has the focus, and the user hits tab, i want the next field of the flex to get the focus, and not the next control on the form, is this possible ? xBox 09-01-2003, 03:47 PM if my flexgrid has the focus, and the user hits tab, i want the next field of the flex to get the focus, and not the next control on the form, is this possible ? yes... it's possible Private Sub MSFlexGrid1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyTab Then If MSFlexGrid1.Cols - 1 > MSFlexGrid1.Col Then MSFlexGrid1.Col = MSFlexGrid1.Col + 1 MSFlexGrid1.SetFocus End If End If End Sub xBox 09-01-2003, 03:53 PM Following code I have changed it.. compare it to previouse code that i have posted... using this following code u can keep on press the TAB key until end of the cell ... Private Sub MSFlexGrid1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyTab Then With MSFlexGrid1 If .Cols - 1 > .Col Then .Col = .Col + 1 .SetFocus Else If .Rows - 1 > .Row Then .Row = .Row + 1 .Col = 1 End If End If End With End If End Sub |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum