Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass parameters to classes visually
Message
 
 
À
20/03/1998 15:16:57
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00085781
Message ID:
00086109
Vues:
35
Rex,

All the contained objects Init before the container, this way they are ready to go and you can talk to them from the container Init(). If you pass your form a parameter like this:
   do form GetDate with date()


In the form Init you need:
lparameter pdDefault
this.Calendar.SetDate( pdDefault ) && call method of the calendar

or you may need to set individual properties of the calendar
with this.Calendar
   .Month = month( pdDefault )
   .Day = day( pdDefault )
   .Year = year( pdDefault )
endwith

After setting these properties you might need to call a Refresh() method so that it updates it's display.

It really just depends on the properties and methods that the Calendar class exposes as it's public interface.

>What I have is a form creating with a parameter which feeds a calendar class.
>
>The idea is that I create the form, with the calendar instantiated to the correct month and year, what I'm getting is a form with the calendar created for the default value and I need to change the month in the Init method of the form.
>
>The question actually is: How can I send a form parameter to a visually created object in a form???
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform