|
-
May 20th, 2008, 12:56 AM
#1
[RESOLVED] Visible line count in MSHFlexGrid
Is there anyway to get the number of lines that are visible in an MSHFlexgrid?
I need to go thru the data that is on the screen at present time and need to know the total number of visible lines.
-
May 20th, 2008, 01:32 AM
#2
PowerPoster
Re: Visible line count in MSHFlexGrid
If you are talkning about the number of visible rows, then you can loop through the rows like this:
I just whipped this up quickly. Hope it helps. Once you get the value of j where the first row that isn't visible occurs, you can work from there.
Code:
Dim isvisible As Boolean
With MSHFlexGrid1
.Rows = 20
.Cols = 2
For j = 1 To MSHFlexGrid1.Rows - 1
isvisible = .RowIsVisible(j)
If isvisible = False Then
MsgBox j
Exit For
End If
Next j
End With
-
May 20th, 2008, 01:41 AM
#3
Re: Visible line count in MSHFlexGrid
Thanks,
Here's what i have come up with
vb Code:
Private Function GetVisibleRows(msh As MSHFlexGrid) As Long Dim i As Long Dim Count As Long With msh For i = .TopRow To .Rows - 1 If .RowIsVisible(i) Then Count = Count + 1 Else Exit For End If Next i End With GetVisibleRows = Count
-
May 20th, 2008, 02:43 AM
#4
PowerPoster
Re: [RESOLVED] Visible line count in MSHFlexGrid
my pleasure. I'm glad I could help. You have helped me many many times in the past
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|