Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object.Draw method
Message
De
14/08/1998 05:56:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00126802
Message ID:
00126822
Vues:
26
>Hi.
> I am using a *.scx file and I display my form like this
>
> PUBLIC myform
> DO FORM myform LINKED
>.........
>&& I assume here that myform variable will be pointing to myform form && object
>
>However in another *.prg file, I have these statements
>
> CLEAR
>
> myform.Draw
>
>I get an error when I call myform.Draw saying that there is no method called Draw. However in VFP 3.0 the help file says yes there is.
>
>Help! :)
>Ian
Ian,
You missed the syntax in fact but however since VFP assigns scx name as objectname in this case myForm was referring to your form (with multipl instances you would be always referring to first instance if you use scxname as objecname). So I couldn't get why you got the error either but luckily it prevented you from using objectref and draw wrongly :
DO FORM myform NAME oMyForm LINKED  && Name clause needed
....
oMyForm.refresh  && You really want draw ? 

* Clear nearly forgotten in VFP - 
* Do you print results on form or draw lines, boxes ?
Instead of "Clear" now fortunately we have "cls" method :
oMyForm.cls
Cool, it only clears out extra prints, lines drawn etc and other controls available when form inited remains intact (no need to draw, paint, refresh).
With "clear" you would be lost in space, it would clear out everything including labels, grids, commandbuttons etc. and worse draw, refresh, paint wouldn't help to restore them (BUT just a ?"" DOES RESTORE in VFP5 !).
To be true I haven't yet found a place for draw and paint (sure I know I will need them in very special cases).

PS: You could "activate screen" and ? results there (I do sometimes for debugging).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform