Welcome to Dream.In.Code
Click Here
Getting VB Help is Easy!

Join 118,589 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 817 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



mshflexgrid

 
Reply to this topicStart new topic

mshflexgrid, the data should be enterd by using textbox, this textbox should be pla

vbcodepra
post 6 May, 2008 - 12:20 AM
Post #1


New D.I.C Head

*
Joined: 6 May, 2008
Posts: 1

the data should be enterd by using textbox, this textbox should be placed in mshflexgrid ,
and also by pressing the tab it should move to net cell in msflexgrid
User is offlineProfile CardPM

Go to the top of the page


tweety0012coo
post 7 Aug, 2008 - 07:23 PM
Post #2


New D.I.C Head

*
Joined: 25 Jun, 2008
Posts: 2


My Contributions


QUOTE(vbcodepra @ 6 May, 2008 - 12:20 AM) *

the data should be enterd by using textbox, this textbox should be placed in mshflexgrid ,
and also by pressing the tab it should move to net cell in msflexgrid


CODE
Private Type FlxCell
    row As Long
    col As Long
End Type
Private m_ActiveCell As FlxCell

'Undo
Private Type UndoType
    uText As String         'The whole Grid
    uRows As Long           'Count of Rows
    uCols As Long           'Count of Cols
    uName As String         'Undo Name
End Type
Private Sub Form_Load()
MSFlexGrid1.RowHeightMin = Text1.Height
MSFlexGrid1.ColWidth(0) = 100
Text1.Visible = False
End Sub
Private Sub MSFlexGrid1_DblClick()
If MSFlexGrid1.row > 0 Then
        m_ActiveCell.row = MSFlexGrid1.row
        m_ActiveCell.col = MSFlexGrid1.col
        With Text1
            .Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
            .Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
            .Width = MSFlexGrid1.CellWidth
            .Text = MSFlexGrid1.Text
            .Visible = True
            .ZOrder
            .SetFocus
        End With
    End If

End Sub
Private Sub Text1_LostFocus()
MSFlexGrid1.TextMatrix(m_ActiveCell.row, m_ActiveCell.col) = Text1.Text
    Text1.Visible = False
End Sub

User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/11/08 07:57PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month