Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loop through all Command Buttons
Message
De
13/04/2004 16:35:12
John Baird
Coatesville, Pennsylvanie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00894590
Message ID:
00894594
Vues:
9
FOR EACH loControl IN thisform.objects
     IF LOWER(loControl.baseclass) = 'command'
         ** Do what you want here
     ENDIF
ENDFOR
>Hi,
>Is there a way to loop through all of the command buttons on a form? I have a command button
>on a form that creates and puts other command buttons on this form, Button_1, Button_2, etc.
>However, when I try to remove these buttons -- clicking another command button labeled "remove
>buttons", I get a message that button_1 does not exist, even though I still can see it
>on the form.
>
>I would have thought that this would work. Each button_1 ... is an instance on the
>class called MyDate, a command button.
>
>
>IF PEMSTATUS(m.THISFORM, "Button_1" , 5)
> thisForm.RemoveObject("Button_1","MyDate")
>ENDIF
>
>
>Thanks
>Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform