Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disappearing of graph on the form
Message
De
29/03/2006 11:41:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/03/2006 07:47:56
Somesh Sahu
Cybage Software Pvt Ltd,
Pune, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Divers
Thread ID:
01108745
Message ID:
01108861
Vues:
9
>Hi,
> I am facing one problem.
> On one of the form of my project, there are 5 tabs. On 1 tab, I am generating a graph by using Thisform.line() method. But when I move to other tabs and come back to that tab, the graph disappears. It happens also when I toggle between windows or minimize and restore the screen.
> Please tell me the reason and the solution.

Anything that you put on a form using .pSet(), .line(), .print() etc is just temporary. Any event that may cause the form to repaint will erase it. These methods are pretty much an emulation of the console - issuing .print() in a loop on a form would cause it to scroll behind any controls you may have on it.

The way around this is to have a line object for each segment of your graph. So instead of .line(x1, y1, x2, y2), you'd have an
this.addobject("oLinennn","line")
with this.oLinennn
   .left=x1
   .top=y1
   .width=x2-x1
   .height=y2-y1
   .slant=iif(..., "/", "\")
   .visible=.t.
endwith
Actually, this conversion of two pairs of points into a line object may be a bit more complicated, as you can't have negative height, i.e. it may look different if your graph segment is ascending or descending. Also, the slope expression would depend on the same thing.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform