Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Could not delete textbox in a grid on pageframe
Message
De
03/06/2002 15:49:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00664129
Message ID:
00664248
Vues:
30
>Ok, will try it next time :) This time I did it programmatically using the following code:
>
>********************************************************************
>*  Description.......: GridBuilder - allows to build a grid in design-time
>*  Calling Samples...:
>*  Parameter List....:
>*  Created by........: Cetin Basoz
>*  Modified by.......: Nadya Nosonovsky 10/25/2001 04:14:31 PM
>********************************************************************
>*custom builder not registered
>aselobj(arrObj)
>for each oObj in arrObj
>	if upper(oObj.baseclass)='GRID'
>		for each oColumn in oObj.columns
>			with oColumn
>*			    .name = "col"+proper(justext(.controlsource))
>			>				if .name = 'Column2' and type('oColumn.text1')="O" and lower(.text1.baseclass)='textbox'
						.newobject('newtext1','EditInGrid','nAdditions.vcx')
						.removeobject('text1')
.newtext1.name="text1"
>
>				endif
>							>			endwith
>		next
>	endif
>next
It did delete the control, and recreated it right away. A column can't exist without a current control, so when you remove that one, it creates a new one automatically. So you should add your new textbox first, then kill the old one, and (optionally) rename it to text1 (if your code mentions the name anywhere).

And I think we did talk about this a year or so tomu nazad...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform