Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Calendar, the TextBox and their Relationship
Message
 
À
11/01/2008 18:47:45
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01281278
Message ID:
01281282
Vues:
10
>Got a Calendar class (RCSCalendar.vcx) and a TextBox to hold the selected date. The class has 42 small labels and on the click event (inherited from their parent labels) they populate a property on the container. I want to update the TextBox whenever that click occurs. It doesn't seem correct to add code to all those parent label Click events to refresh the TextBox value as it is at the form-level, as is the container, but I'm not sure how to get the TextBox to refresh other than in those 42 Click events. It's much simpler than I made it sound, but I can't think of another way to say it.

If you can modify the class, you can add a assign method to the property of the container and in it put something like this.parent.refresh()

[Update]
And if you can not modify the class you can use a bindevent(YourCalendar, 'PropertyThatIsUpdated', YourCalendar.Parent, 'Refresh') or similar
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform