Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove Objects from a Form
Message
De
02/09/2005 10:49:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01046174
Message ID:
01046237
Vues:
18
>>>Dear All,
>>>
>>>I append several objects programmatically, how can I remove it "automatically"?
>>>e.g.
>>>
>>>nEditBox1
>>>nEditBox2
>>>nEditBox3... nEditBox999
>>>
>>>How can I issue a command to remove them all?
>>>
>>>
>>>FOR x = 1 TO 999
>>>    nLabel = EVALUATE([nEditBox]+TRANSFORM(x))
>>>    f_form.removeobject(nLabel)
>>>ENDFOR
>>>
>>>
>>>However, I don't know how many EditBox I added beforehand...?!
>>
>>If they're from same class you can brodacast a message to tell them to remove themselves. ie:
>>
>>*Custom property Action
>>*Action_assign
>>lparameters vNewVal
>>if vNewVal='destroy' and type('this.parent')='O'
>>   this.parent.RemoveObject(this.name)
>>endif
>>
>>thisform.SetAll('Action','destroy','myClass')
>>
Cetin
>
>Hi Cetin,
>
>I use this a lot! To do a similar thing... Works great!
>
>[]s!

Yes much easier than trying to find controls to operate on:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform