Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageFrame woes
Message
 
À
26/10/1999 14:24:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00281596
Message ID:
00281702
Vues:
14
Well John, you're two for two! I don't have any experience with the _Assign methods of properties either (can you tell I'm new to FoxPro?) After briefly looking it up, I think you may have hit this nail on the head! I'm going to read a bit more about it, then give it a shot, but I think this is going to work for me.

Go Dolphins!!

er, I mean thanks John!!

(Actually, I'm going to the game in Oakland this weekend. My brother's a big Dolphin fan, and my dad's a big Raider fan. It should be interesting on Halloween!)

- Kile



>Not really, Kile. You can run the same selector form from the main form. If you use an Application property to hold the desired Page number, you can then put an _ASSIGN method on that property to switch the displayed page IF the form is active. So the same form can do double-duty.
>
>>
>>This was how I had initially set it up, and this worked fine, with one exception. I want the user to be able to perform additional searches from this form. Using separate forms would mean that I had to destroy the main form, display the selection form, get the parameters, then re-load the main form. This was taking just a little too long for each search, mostly because there are some background tables being loaded with the main form each time (could be a design problem here...)
>>
>>The way I'm trying to do it now enables me to load the background tables of the main form only once, no matter how many searches the user performs. I'm beginning to wonder if I should have used two forms (each as a class) instead of the two pages on a PageFrame. The PageFrame just seemed to lend itself to exaclty what I was doing at the time, since the records displayed on the second page are children of the record displayed on the first page. The tabs enabled me to easily switch back and forth between them.
>>
>>
>>>Hmmmm.......
>>>
>>>What about moving the the selection form right out of the other form. Call it first, set an Application object property or PUBLIC var (yuck) to 1 or 2 as required, and then in the Init of the Pageframe, set ActivePage to that property or var?
>>>
>>>>
>>>>Thanks for the suggestion! I have heard people mention the UIEnable event, but never knew what it was. I just finished looking it up in the FoxPro help and Hacker's Guide. It has a lot to do with the problem I'm having, but seems to not work in the one place that I need it to.
>>>>
>>>>As I understand it, it fires before the Activate() and Deactivate() methods do for pages in a PageFrame. This would be a great place to say "No, I want the other page to be activated instead of this one." But there is a catch. FoxPro help states that the UIEnable event does not occur for pages when the form is initially activated. So this bypasses the one spot that I would need this functionality.
>>>>
>>>>I'll continue to think of a way I can make this do what I want it to do, with the addition of the UIEnable method.
>>>>
>>>>If you can think of anything else though, I'd love to hear it!
>>>>
>>>>Thanks!
>>>>
>>>>- Kile
>>>>
>>>>
>>>>
>>>>>Hi Kile,
>>>>>
>>>>>Look at the UIEnable event. You might be able to move your code around between Activate and UIEnable for the pageframe to get the behavior you want.
>>>>>
>>>>>
>>>>>>I'm having a bit of a problem getting my PageFrame to work the way I want it to.
>>>>>>
>>>>>>Is there a way to change the ActivePage without actually imediately activating that page? (I know, sounds stupid, but...)
>>>>>>
>>>>>>Here's the scenario: I have a form with a two-page PageFrame. When my form runs, the form1.Init() calls a small form2 for the user to enter search criteria, which is returned to the form1.Init(). (The search criteria consist of locating a record from one of two recordsets.) If the search criteria calls for the first record set, the first page should be activated. Otherwise the second page should be activated.
>>>>>>
>>>>>>The problem is, if I explicitely activate a page in the form1.Init(), it automatically gets activated again imediately after the Init() is done. I only want the correct page to get activated once, because the Activate method for each page invokes other methods that I only want to fire once each time the page is activated.
>>>>>>
>>>>>>The only solution that I've found that comes close is seting the page order of the pages so that the first page in the PageFrame is the one I want opened first. The problem with this is that the Page tabs get changed (since I'm changing the PageOrder?), and I need the two pages to always look like they're in the same order.
>>>>>>
>>>>>>Anyone have any suggestions?
>>>>>>
>>>>>>Thanks!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform