Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 Tags
Subject: RE: Grid height
Thread ID: 233725 Message ID: 233742 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, July 06, 2009 2:28:16 PM         
   


> > Hi Russell -
> >
> > Your desired grid.Height would probably the number of rows * grid.RowHeight + SysMetric(8) + grid.HeaderHeight
> >
> >
> > hth
> > -Stefan
>
> Beautiful Stefan - that works well. I'll keep SYSMETRIC in mind in similar situations.

You're welcome! I forgot the grid.LineWidth if grid.GridLines=3 or 1:

CREATE CURSOR temp (test i)
INSERT INTO temp VALUES (1)
INSERT INTO temp VALUES (2)
INSERT INTO temp VALUES (3)
o = CREATEOBJECT('Form')
o.AddObject('g','Grid')
o.g.Move(0,0,o.Width,o.Height)
o.g.Anchor = 15
o.g.Visible = .T.
o.Height = RECCOUNT('temp') * o.g.RowHeight + SysMetric(8) + o.g.HeaderHeight
o.Show()
&& forgotten grid.LineWidth:
o.Height = o.Height + RECCOUNT('temp') * o.g.GridLineWidth



hth
-Stefan



COMPLETE THREAD
Grid height Posted by Russell Hill @ 7/6/2009 11:48:31 AM
RE: Grid height Posted by Stefan Wuebbe @ 7/6/2009 11:57:13 AM
RE: Grid height Posted by Russell Hill @ 7/6/2009 2:13:15 PM
RE: Grid height Posted by Stefan Wuebbe @ 7/6/2009 2:28:16 PM
RE: Grid height Posted by Russell Hill @ 7/7/2009 5:40:07 AM
RE: Grid height Posted by Anders Altberg @ 7/6/2009 1:35:13 PM
RE: Grid height Posted by Russell Hill @ 7/6/2009 2:05:25 PM
RE: Grid height Posted by Anders Altberg @ 7/6/2009 8:59:22 PM
RE: Grid height Posted by Russell Hill @ 7/7/2009 5:40:23 AM