Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default command button
Message
De
07/01/2000 15:04:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00314543
Message ID:
00314676
Vues:
22
Hmmm....the code I posted doesn't care about the form. It's using relative addressing, as in This.Parent = Pageframe. This.Parent.Parent would refer to the form...see? I haven't seen your code so I'm not sure if this is what you ware talking about.

>>
>>That's not really a great way to solve the problem, because it still moves focus from the current control to the default button.
>>
>>Jerry can always put This.Parent.Page2.Command1.Default=.F. in the Activate of Page1 and the reverse (set it to .T.) in the Activate of Page2.
>
> Right, I hadn't thought about it. I replied, because I had a similar problem and solved it the way I described. In my case I can not use your solution, though, because I created a class, which doesn't know anything about a form, on which I'll place it lately. And actually nodefault in my case returns focus to text control and it was desirable effect in my situation. I sent my classes into classes-VCX section, so they appear there soon, unless Nick will find too much bugs in them :)
>
>>
>>>Hi Jerry,
>>>
>>>Just place if nKey=13 NODEFAULT in text1 and text2 keypresses methods.
>>>
>>>>I have a page frame with 2 pages.
>>>>
>>>>Page2 has a textbox and a command button with DEFAULT set to TRUE.
>>>>
>>>>Page1 has a textbox and a command button with DEFAULT set to FALSE.
>>>>
>>>>When I am in the textbox on page1 and press Enter, the command button from page2 fires and display on page1.
>>>>
>>>>Should that happen? I would like nothing to happen when Enter is pressed on page1.
>>>>
>>>>I would think that pressing Enter would only call page2 command button when I am on page2.
>>>>
>>>>How should this work?
>>>>
>>>>Thanks
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform