Information générale
Catégorie:
Codage, syntaxe et commandes
>>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
>
>Hi Sylvia,
> I built a demo form with a pageframe that sets the Default property of the cmdSave control on the active page to .T. (all others .F.) when the Activate event occurs. It works correctly.
> Basically, I created a three page pageframe. On each page I placed one textbox txtDummy and one command button cmdSave. I set the tab order to be txtDummy, cmdSave. Next in each page's Activate I added the code:
> This.Parent.ActivatePage(This)
>I added the method ActivatePage to the parent pageframe class:
>
>LPARMETERS poPage
>WITH This
>ENDWITH
Hi Edwin -
I'm a little confused. I don't understand why you'd need to put the code you indicated in the page activate, since clicking on a page should make it the active page anyway (i.e. set the pageframe active page to the current page). But it is interesting you didn't get the bug that Paul Frost mentioned (the one acknowledged by MS). On the other hand, I have a lot of controls (text boxes, combos, etc. on each of my pages, so maybe the complexity...?)
Sylvia
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement