Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't set Default button at run time
Message
De
28/04/1999 12:56:41
 
 
À
28/04/1999 12:54:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00212505
Message ID:
00213054
Vues:
38
Hi Sylvia --

OIC. Is there any way you can move the buttons off the pageframe and put them into the main form, controlling behavior and maybe caption by testing PageFrame.ActivePage?

>Nope, I understood you. But perhaps I didn't explain clearly why that won't work for me. I would have to put this.default = .T. in a one button on page 1 and another button on page 2, since the effect I want is for that particular button on the active page to be set as the default (i.e. I have two different buttons on two different pages). But if I do as you suggest, then the first time I click on page 1 and the button refresh is called, that button gets set to true. Then if I click over to page 2, the button refresh sets that button to true. So now I have two buttons on two different pages set as the default button, when only one button per form can be set as the default because nothing ever sets a button to false. That's why I was trying to include code in the Activate/Deactive of each page to toggle each button's default .T. or .F. so that only one button on the form would ever have its default set to .T. at any one time. Does that make sense? (In any event, I still can't
>get the button on the second page to ever act like it's the default).
>
>Sylvia
>
>Hi Sylvia.
>>
>>I think you misunderstood. I meant have THIS.Default=.T. in the Refresh() of the affected commandbutton.
>>
>>>I think confirm was off, but added it anyway...same result. The problem I have with setting default = .t. in the control itself is that I believe only one control on a form can have default set to .t. So by including that code in the refresh itself, you're going to have all the controls set as default, and then the form doesn't know which one is the default. Since I'm using page frames, I only want the Active Page control (e.g. save) on that page to be set to .t.
------------------------------------------------
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
Répondre
Fil
Voir

Click here to load this message in the networking platform