Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many rows are in a grid: visible and total ?
Message
 
 
To
31/01/2003 15:14:02
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00747837
Message ID:
00747880
Views:
22
Alex,

reccount() will tell you how many rows are needed total (or select count(*) if you have deleted rows)

The number of available rows on the grid can be calculated based on grid.height - grid.HeaderHeight - N * ( grid.RowHeight + grid.GridLineWidth ) and conditionally minus sysmetric( 15 ) if there is a horizontal scroll bar. There's also another few pixels of height lost to other pieces of the grid that you need to account for.

>In order to choose the best row of a grid in which to show the active record, you need to know how many rows fit in the grid as well as the total number of rows (visible and out of sight) but I don't find any properties that give this directly. Does somebody know how to calculate them?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform