Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The Calendar, the TextBox and their Relationship
Message
 
To
11/01/2008 18:47:45
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01281278
Message ID:
01281282
Views:
9
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform