CodeItBetter Programming Another VB Programming Blog

How to enter text in MSFlex Grid control without using text box.

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'Controls - How to enter text in MSFlex Grid control without using text box.
'In MSFlexGrid1 Directly we can enter without Calling textbox (any Other controls).

Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
    Select Case KeyAscii
    Case 30 To 136 Or 8
        MSFlexGrid1.Text = MSFlexGrid1.Text &  chr ( KeyAscii)
    Case 13
 
        If MSFlexGrid1.Col < 4 Then
 
            MSFlexGrid1.Col = MSFlexGrid1.Col + 1
        Else
            MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
            MSFlexGrid1.Row = MSFlexGrid1.Row + 1
            MSFlexGrid1.Col = 0    'MSFlexGrid1.Col + 1
        End If
    End Select
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.