Results 1 to 2 of 2

Thread: TextBox In MSHFLEX GRID

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Location
    khi
    Posts
    24

    TextBox In MSHFLEX GRID

    Hello,
    I have a table item it has 3 field code name qty
    it is connect with adodc and flexgrid wht i want is
    if my focus is on code it display a textbox in cell and then
    when i pressed tab or enter it display in name then
    qty


    plz help me
    regards
    want to learn vb

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    I have no idea what you said. I had to make a guess...

    Place a textbox on your form, remove it's border, and set it's visibility to false. Name it txtflex, and name your flexgrid as flex.

    VB Code:
    1. Private Sub flex_Click()
    2.  
    3. txtflex.Top = flex.Top + flex.CellTop
    4. txtflex.Left = flex.Left + flex.CellLeft
    5. txtflex.Visible = True
    6. txtflex.Text = flex.Text
    7. txtflex.Width = flex.CellWidth
    8. txtflex.Height = flex.CellHeight
    9.  
    10. End Sub
    11.  
    12.  
    13. Private Sub txtflex_Validate(Cancel As Boolean)
    14.  
    15. flex.textmatrix(flex.row, flex.col) = txtflex.text
    16. 'or code to update db
    17.  
    18. txtflex.visible = false
    19.  
    20.  
    21.  
    22. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width