Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Setall
Message
 
À
06/03/2001 11:50:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00482223
Message ID:
00482297
Vues:
12
>>>Hi all:
>>>
>>>Moving slowly from 2.6 to VFP, I'm trying to learn about SetAll. I've created a form (using quick form) and placed a command button on the form. The intent is to either Disable or Enable all the textboxes which were created. In the click event of the command button I have placed
>>>
>>>Thisform.SetAll('enabled',IIF(This.Caption="Enable",.T.,.F.),"Textbox")
>>>This.Caption=IIF(This.Caption="Enable","Disable","Disable")
>>>
>>>
>>>When I click on the button, the caption changes, but none of the controls do.
>>>
>>>What have I missed????
>>>
>>>Thanks to all..........Rich
>>
>>
Thisform.SetAll('enabled',IIF(This.Caption="Enable",.T.,.F.),"Textbox")
>>This.Caption=IIF(This.Caption="Enable","Disable",<b>"Enable"</b>)
>>
>>If your textboxes initially are enabled, you probably need to change the initial button caption to "Disable"
>
>Sorry Nick, my bad on the typing. I had the line which set the caption properly configured and the initial caption is Disable. Somehow I mananged to %$#^ it up when I pasted it here.
>
>The caption is switching properly.
>
>But when I click on the button, the textboxes are always enabled.
>
>I modified the code to Enable/Disable a single textbox by name and it worked fine.
>
>Do you see any possibilities with my syntax in SetAll???
>
>Thanks for your help.........Rich

No, I don't see anything wrong. The code as I posted it above works just fine in a sample form.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform