Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't set Default button at run time
Message
De
27/04/1999 15:03:11
 
 
À
27/04/1999 12:07:35
Paul Frost
Instem Computer Systems Ltd
Stone, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00212505
Message ID:
00212662
Vues:
30
>>I seem to have the opposite problem of several I've seen relating to the default button: namely, I intentionally begin with default set to .F. for all my buttons, but then when then in the Activate of a page on my page frame, want to set the save button .T. so that Enter works in typical Windows behavior (I want to be able to set the default to one button on page 1 and a different when I click on page 2). Problem is, I can't get it to work, i.e. I set the button's default property to .T., then checked the value which shows as .T., but it doesn't 'work as coded'. I've tried refreshing the page the button is on, and the form, to no avail.
>>
>>Any ideas on this?
>>
>>Thanks,
>>
>>Sylvia
>
>In VFP5.0/5.0a there is a known bug, where a call to any GotFocus method on a form resets the Default property of command buttons back to the original state (MS ref. PSS Id Q190567 dated 8/7/98). (I seem to have had a similar problem with the setFocus method too)
>
>MS recommend saving the state of the Default property for all buttons, prior to a call to DoDefault() in GetFocus & then resetting the state as required. Its the intrinsic (default) GetFocus function that causes the problem - there's no mention of what happens if NoDefault is used - that might be worth trying.
>
>
>hth
>
>Paul

In looking through my code, I'm not calling any gotfocus methods prior to trying to set the default button property, so this may not be related to my problem. But I'll take a look at that article.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform