Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Gibson
  Where is Paul Gibson?
 Glasgow
 United Kingdom
 Paul Gibson
 To: Tore Bleken
  Where is Tore Bleken?
 Stokke
 Norway
 Tore Bleken
 Tags
Subject: RE: Grid graph
Thread ID: 395806 Message ID: 395925 # Views: 59 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, January 21, 2014 12:50:09 PM         
   


> > Hello experts,
> > Any one can help me how to code a graph on the grid. Can you post the sample code guys. I attached the data below:
> >
> >
> > I need to place the graph in the 5th column beside the Actual points earned. Thanks.
> >
> > Regards,
> > Randy
>
> This code is made by Calvin Hsia, one of the programmers behind VFP9.
>
> * http://blogs.msdn.com/b/calvin_hsia/archive/2005/11/20/495152.aspx

... snip ...

That's great, very nice visualisation. The only niggle I have with most similar solutions that I see is that if I click in the cell with the graph bar in it the bar disappears or in other solutions the bar actually moves to assume the value from a different row. In Calvin's solution it is the former. I'm sure there are multiple different ways to stop that from happening, I found one which is to put the line:

This.grd.Columns(2).Enabled = .F.

...into the Load event of the Form class underneath the This.grd.Columns(2).Width = 300 line. That does the trick and only leaves a slight flicker issue. Another solution might be to leave the column enabled but to have a When event that simply returns .F.

ENTIRE THREAD

Grid graph Posted by randy requina @ 1/20/2014 7:32:40 AM
RE: Grid graph Posted by David Mustakim @ 1/20/2014 7:38:40 AM
RE: Grid graph Posted by randy requina @ 1/20/2014 7:51:13 AM
RE: Grid graph Posted by Stefan Wuebbe @ 1/20/2014 7:53:30 AM
RE: Grid graph Posted by randy requina @ 1/20/2014 8:43:27 AM
RE: Grid graph Posted by Stefan Wuebbe @ 1/20/2014 12:15:34 PM
RE: Grid graph Posted by randy requina @ 1/23/2014 9:43:20 AM
RE: Grid graph Posted by David Mustakim @ 1/23/2014 10:01:27 AM
RE: Grid graph Posted by Vilhelm-Ion Praisach @ 1/21/2014 9:48:19 AM
RE: Grid graph Posted by Stefan Wuebbe @ 1/21/2014 10:44:06 AM
RE: Grid graph Posted by Vilhelm-Ion Praisach @ 1/21/2014 11:06:06 AM
RE: Grid graph Posted by randy requina @ 2/22/2014 9:31:54 AM
RE: Grid graph Posted by Tore Bleken @ 1/21/2014 10:08:52 AM
RE: Grid graph Posted by Paul Gibson @ 1/21/2014 12:50:09 PM