Results 1 to 3 of 3

Thread: PageUp and PageDown with Flexgrid (Resolved)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Location
    Redondo Beach
    Posts
    25

    PageUp and PageDown with Flexgrid (Resolved)

    I have a flexgrid which I populate from a DB. The user has the ability to resize the grid to any height so the number of rows being shown can change dynamically. I am writing code for the PageUp and PageDown keys. I use a hook from http://vbaccelerator.nuwebhost.com/c...k/vbalhook.htm so I have to write code to capture these key strokes.

    My problem is that I don't know how to get the number of rows shown at any given time. How do I do this?
    Last edited by Jacque; Feb 21st, 2003 at 09:55 AM.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    VB Code:
    1. Dim intRows As Integer
    2.     Dim intIndex As Integer
    3.    
    4.     For intIndex = 0 To MSFlexGrid1.Rows - 1
    5.         If MSFlexGrid1.RowIsVisible(intIndex) Then
    6.             intRows = intRows + 1
    7.         End If
    8.     Next
    9.     MsgBox intRows

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Location
    Redondo Beach
    Posts
    25
    That did it. Thank you very much.

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