Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21842

[RESOLVED] Edit Ms Flex Grid

$
0
0
Dear all,

I want to Edit MSFLEXGRID using a text box but my textbox(txtEdit) is not getting fix on flexgrid(fg1) cell. Please look at the attached snap.
my code is as under
Code:

Private Sub fg1_Click()
    Call SetForEdit
End Sub

Private Sub fg1_EnterCell()
    Call SetForEdit
End Sub

Private Sub fg1_LeaveCell()
    fg1.Text = txtEdit.Text
End Sub

Private Sub Form_Activate()
    Call SetForEdit
End Sub

Public Sub SetForEdit()
    With txtEdit
        If Not fg1.Text = "" Then
            txtEdit.Text = fg1.Text
        Else
            txtEdit.Text = ""
        End If
       
        .ZOrder
        .Top = fg1.CellTop
        .Left = fg1.CellLeft
        .Height = fg1.CellHeight
        .Width = fg1.CellWidth
        .SetFocus
    End With

End Sub

Attachment 98957
Please suggest
Attached Images
 

Viewing all articles
Browse latest Browse all 21842

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>