Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use a container across multiple pages in pagefram
Message
From
13/05/2005 12:30:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
13/05/2005 12:18:40
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01013681
Message ID:
01013936
Views:
16
>Hi Dragan,
>
>> But if the idea is to have all the things on the containers show the same thing, that can be achieved by binding all the controls on it to same controlsources, and refreshing them in .uiEnable(). Sounds simpler, and also solves the tab order problem.
>
>There's always at least 3 ways to do something in VFP and I'm looking for that elusive 4th or 5th way that your solution hints at ...
>
>Can you explain your idea in a bit more detail or refer me to a topic in VFP help? I "almost"<g> understand your concept ... so tantalizingly close, and yet so far ...

If your container is a contained in a page class, then each page will have its own container. They'll all look the same, unless you do something to them - change properties when designing a form, or subclassing one of the pages, whatever. That part is up to you, actually. Anyway, since each page has its own container, these containers are separate objects. Now since you want them to be in sync, and behave as one container, let's see what does it mean "behave the same".

Assume you have a textbox on that container, and it should show a string. That string should be the same on each container, right? So if the string is changed on one container, you want it to be changed in all containers. The way to do that is to store the string elsewhere, not in the container.textbox.value - which means the textbox should have a controlsource. This controlsource can be a form's property, or a field in a table, or a field in a cursor (one record cursor which has no other use is also OK), or a property of _screen, or a property of an object which is contained in the form or in _screen or in your application object - you have a lot of choices here.

So if the cnt.textbox.value changes on one container, since the textbox is bound, the value of any other control that's bound to the same controlsource will also change. And voila - your containers are in sync. You may need to refresh each of them when the active page changes, so the value displayed reflects the value of the controlsource - but then you can just add a this.refresh in the activate event of your page class, that would refresh all controls on the page.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform