Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't set Default button at run time
Message
De
29/04/1999 09:13:22
Paul Frost
Instem Computer Systems Ltd
Stone, Royaume Uni
 
 
À
28/04/1999 13:24:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00212505
Message ID:
00213410
Vues:
31
>John -
>
>I think Paul Frost may have came up with the real problem (see his thread here) where he said that it's the 'intrinsic' VFP gotfocus() event behavior which resets the command button to its default value. I didn't think that applied to me because I missed him saying 'intrinsic' and I knew I didn't have any gofocus() code on my form. But I do set focus to a control on each page in the page activate, so I guess that's going to fire the intrinsic gotfocus event. This would tend to explain what I observed when I was stepping through the code: the property gets set, but 'a reset to the original default occurs in the intrinsic gotfocus behavior for all VFP controls
>
>MS says its been fixed in 6.0 and they offer a workaround which (as they say) is likely to be difficult to implement:( I certainly want to move to VFP 6.0, but didn't necessarily plan on doing it today...guess I better take a look the workaround...growl!

Did you try using NoDefault ? As soon as I found that the SetFocus was causing the problem, I modified what I was trying to do to get the right effect, rather than try to find a way around the original problem. (I kept the same default button & changed it's caption, a cop out, I know, but it was workable).

Paul
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform