Results 1 to 4 of 4

Thread: Question about MS Flex Grid?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Posts
    93

    Post

    I assumed the ms flex grid worked in the same mannor as the dbgrid control. When I use the dbgrid, I can click on it and type in it.

    When I use the ms flex grid. When I click on it, I get get the dotted rectangle aroud it but I cannot type anything into it. Do I have to write code in got focus event or something.

    Thanks
    BJ

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    The MS FlexGrid is a ReadOnly Control, to be able to Write to it you will have to write routines to cater for that kind of functionality.

    For example, when a Cell is clicked you could position a Text Control over that cell and allow the User to enter text into the Grid via the Textbox Control.

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  3. #3
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226

    Post

    Go to DBGrid. It might be the best of the worst but it does the job and it's free

    Good Luck.

  4. #4
    New Member
    Join Date
    Dec 1999
    Location
    USA
    Posts
    3

    Post

    ** T1 is a text box, FG1 is a msflex grid **

    Private Sub FG1_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case 113
    Set_TextBox
    End Select
    End Sub

    Private Sub Set_TextBox() 'put textbox over cell
    With T1
    .Top = FG1.Top + FG1.CellTop
    .Left = FG1.Left + FG1.CellLeft
    .Width = FG1.CellWidth
    .Height = FG1.CellHeight
    .Text = FG1
    .Visible = True
    .SelStart = Len(.Text)
    .SetFocus
    End With
    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