I am new to vb
Flexgrid
Header 01 .... 31
Values .........
I am entering the values at run time in flexgrid cell, if i click tab button, the focus will move to next cell on the same row.
Code for Ascii
Private Sub flexgrid_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 48 To 57
flexgrid.Text = flexgrid.Text & Chr(KeyAscii)
Case 46 'Dot
flexgrid.Text = flexgrid.Text & Chr(KeyAscii)
Case 8
If Len(flexgrid.Text) > 0 Then
flexgrid.Text = Left(flexgrid.Text, (Len(flexgrid.Text) - 1))
End If
Case Else
KeyAscii = 0
Beep
End Select
End Sub
How to do this.
And also how to change the particular cell background color. Code
For i = 1 To flexgrid.Rows - 1
flexgrid.TextMatrix(i, 33) = vbred 'It's giving value like '255'
flexgrid.TextMatrix(i, 33) = .CellBackColor = vbred 'It's giving value 'False'
Next i
Any ideas & suggestion...?
To move the selected column use the KeyDown (or KeyUp if you prefer) event and place your code there.
To change the cell background color first set the cell, then set the CellBackColor.