Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete image controls programatically..
Message
 
À
24/01/2007 01:47:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01188507
Message ID:
01188515
Vues:
16
>Can I remove all object without knowing the object name? Like removeall images :)

No, but if you want to remove ALL images:
DIMENSION aImage[1]
LOCAL lnFor, lnImage
lnImage = 0
FOR lnFor = 1 TO thisform.ControlCount
    IF UPPER(thisform.Controls(lnFor).BaseClass) == [IMAGE]
       lnImage = lnImage + 1
       DIMENSION aImage[lnImage]
       aImage[lnImage] = thisform.Controls(lnFor).Name
    ENDIF
NEXT
FOR lnFor = 1 TO lnImage
    thisform.RemoveObject(aImage[lnImage])
NEXT
not tested
Also this will remove only images which is placed directly on the form, not if you have them in some container classes.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform