Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bob Brook
  Where is Bob Brook?
 Surrey
 United Kingdom
 Bob Brook
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: Totals at bottom of Grids
Thread ID: 396043 Message ID: 396189 # Views: 40 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Thursday, January 23, 2014 11:22:21 AM         
   


> >
> >
> > "...by setting the default height of the totgrid."
> >
> > I mean, setting the height property within the totgrid class (based upon the standard grid class) to a value which is the same as the grids RowHeight with a HeaderHeight of 0 with that class. I set it to that value, so that on the form design window it approximates to the size it will appear as under the running program.
> >
> >
> >
> > The point is, I cannot duplicate the issue, for under VFP9 SP2 when I try to set the Height property to say, 10px, VFP gives an error and does not accept the change. It is only by making the class a table and changing the height property, before changing it back into a class, can I force a 2005 error from the compiled program.
> >
> > Most OS/PC's do NOT produce the error, so far I've only had it occur on 1 Windows 7 system.
> > Several other Windows 7 systems do not produce the error. I am just wondering what could be different on this PC which makes it fail.
> >
> > Regards
> >
> > Bob of Surrey, England
>
>
> Hi Bob,
>
> Very strange indeed. I checked and changed the class as you showed in your pic and noppers no error.
> Would it seems one needs a failing machines to debug this one on.
>
> In my lab here back in my shop I have XP, Windows 7 and Windows 8.0 test machines setup so I can test most
> of my stuff and classes on all OS's here. The only test bax I do not have is Windows 8.1, but am going to
> add this one in and I do not maintain or test on Vista as it was such a piece of crap anyways.
>
> Pete "the IceMan", from the Great White North of Canada.
> www.marathongriffincomputers.com
Pete,
I was wondering if it could have anything to do with fonts, font sizes and initial re-sizing as mentioned by Stefan.

It would appear to be dependent upon the default values set for the properties of the gridtots class and how an individual PC/system determines what is the minimum acceptable height within the standard VFP/MS grid class.

But these are just thoughts, not quite certain how to go about proving this, other than just playing with the fonts/sizes etc.

On the system on which it fails, an acceptable value is only 1 or 2px larger than on other systems.
I set all my grids to have a RowHeight of 20. Through the code I've shown above and the default grid height of 40, which is then changed when re-positioning gridtots at the bottom of the parent grid. On normal systems the gridtots height comes to 22px (with LineHeight). On the failed PC it is about 23 or 24px. So those 1 or 2px are enough to cause the problem.


Regards

Bob of Surrey, England

ENTIRE THREAD

Totals at bottom of Grids Posted by Bob Brook @ 1/22/2014 2:14:53 PM
RE: Totals at bottom of Grids Posted by Stefan Wuebbe @ 1/22/2014 3:00:58 PM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/22/2014 4:34:42 PM
RE: Totals at bottom of Grids Posted by Pete Sass @ 1/22/2014 7:21:34 PM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/22/2014 8:41:16 PM
RE: Totals at bottom of Grids Posted by Pete Sass @ 1/22/2014 9:37:49 PM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/23/2014 11:22:21 AM
RE: Totals at bottom of Grids Posted by Vicos Vicos @ 1/24/2014 10:59:09 PM
RE: Totals at bottom of Grids Posted by Ilyas Ansar @ 1/24/2014 2:36:16 AM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/24/2014 11:24:20 AM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/24/2014 1:10:24 PM