CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2000
    Location
    Belgium, Bruges
    Posts
    146

    trapping the keyleft and keyright in a flexgrid

    Hi,

    I have a form with several controls on it, one of them a msFlexgrid.
    This flexgrid contains 7 columns (each column shows a day feg: 19/02 20/02 21/02 22/02 23/02 24/02 25/02
    )
    When the user scrols left or right with the arrow buttons and he comes to the last column, i want the flex to shift one day (so you get:
    20/02 21/02 22/02 23/02 24/02 25/02 26/02
    )

    How do i do this. In the keydown, keyup, keypress those keys are not trapped. Also the leavecell, changecolrow don't work because when i am at the end of my flex those events are not called anymore.

    I also tried with the form keyup (setting the keypreview of the form to true), but those keys are also not trapped there.

    Thanx in advance for your help.

  2. #2
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080
    try to trap those events here

    Private Sub MSFlexGrid1_EnterCell()
    MsgBox "Bob"
    End Sub

    Private Sub MSFlexGrid1_LeaveCell()
    MsgBox "test"
    End Sub

    it might help you out.
    Nicolas Bohemier

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

Featured