MS Flex Grid Easy Question (I Hope) 
Author Message
 MS Flex Grid Easy Question (I Hope)

I am new to VB6 and I was trying to test some of the features of the flex
grid. I wnat to be able to type into the cells, however, I do not seem to be
able to do it by default.

Does anyone know how you set up the flex grid so it will accept simple typed
in information

Thanks in advance, Tom



Sat, 13 Jul 2002 03:00:00 GMT  
 MS Flex Grid Easy Question (I Hope)
Place a MSFlexgrid and a textbox with the visible property set to false on a
form and paste the following code to the form and press f5
Private Sub Form_Load()
msflexGrid1.Cols = 5
msflexGrid1.Rows = 10
msflexGrid1.HighLight = flexHighlightAlways

End Sub

Private Sub Grid1_KeyPress(KeyAscii As Integer)

With Text1
    .Visible = True
    .Width = msflexGrid1.CellWidth
    .Height = msflexGrid1.CellHeight
    .Left = msflexGrid1.CellLeft + msflexGrid1.Left
    .Top = msflexGrid1.CellTop + msflexGrid1.Top
    .Text = msflexGrid1.Text

    .SetFocus
End With
If KeyAscii = 13 Then
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)

Else
    Text1 = ""
    SendKeys Chr$(KeyAscii)
End If
End Sub

Private Sub msflexGrid1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyDelete
    msflexGrid1 = ""
End Select

End Sub

Private Sub msflexGrid1_KeyPress(KeyAscii As Integer)
With Text1
    .Visible = True
    .Width = msflexGrid1.CellWidth
    .Height = msflexGrid1.CellHeight
    .Left = msflexGrid1.CellLeft + msflexGrid1.Left
    .Top = msflexGrid1.CellTop + msflexGrid1.Top
    .Text = msflexGrid1.Text

    .SetFocus
End With
If KeyAscii = 13 Then
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)

Else
    Text1 = ""
    SendKeys Chr$(KeyAscii)
End If

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 13
    msflexGrid1.Text = Format$(Text1, "standard")

    Text1.Visible = False
Case 27
    Text1.Visible = False
End Select

End Sub



Quote:
> I am new to VB6 and I was trying to test some of the features of the flex
> grid. I wnat to be able to type into the cells, however, I do not seem to
be
> able to do it by default.

> Does anyone know how you set up the flex grid so it will accept simple
typed
> in information

> Thanks in advance, Tom



Sat, 13 Jul 2002 03:00:00 GMT  
 MS Flex Grid Easy Question (I Hope)

released on Tue, 25 Jan 2000 02:55:37 GMT bearing the
following fruit:

Quote:
>I am new to VB6 and I was trying to test some of the features of the flex
>grid. I wnat to be able to type into the cells, however, I do not seem to be
>able to do it by default.

>Does anyone know how you set up the flex grid so it will accept simple typed
>in information

You use a textbox, place it over the cell in question and
size it so that it is the same size as the cell.  If you
want the full functionality of the flexgrid then go to :

www.videosoft.com

They make the flexgrid control.  The version you get with VB
is limited.

D



Sat, 13 Jul 2002 03:00:00 GMT  
 MS Flex Grid Easy Question (I Hope)
There is a sample application that comes with VB that does this.

Quote:

>I am new to VB6 and I was trying to test some of the features of the flex
>grid. I wnat to be able to type into the cells, however, I do not seem to
be
>able to do it by default.

>Does anyone know how you set up the flex grid so it will accept simple
typed
>in information

>Thanks in advance, Tom



Sat, 13 Jul 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Ms flex grid question

2. data grids/ms flex grids

3. Grid (like MS Flex Grid) With a multi line select

4. Populating MS Flex Grid w/Data

5. MS Hierarchical Flex Grid

6. About MS Flex Grid - Tell me

7. MS Flex Grid Headers

8. Printing form containing MS Flex Grid

9. VB6 MS Flex Grid Copying to clipboard

10. File Loading/Saving File Forms and the MS Flex Grid

11. Q: MS Flex Grid, user-entry fields?

12. MS Flex Grid Click problems

 

 
Powered by phpBB® Forum Software