No offense, but this looks like a user hostile thing to do with the interface.
>This Is from a textbox lostfocus event
>WITH THIS
> LOCAL mct
> mct=.PARENT.CONTROLCOUNT
>
> SET CLASSLIB TO genpopper.vcx
> .PARENT.ADDOBJECT('POPCLICK'+ALLT(.NAME),'popclick',THIS)
> SET CLASSLIB TO
>
> .PARENT.CONTROLS(mct+1).VISIBLE=.T.
> .PARENT.CONTROLS(mct+1).LEFT=.LEFT+.WIDTH
> .PARENT.CONTROLS(mct+1).TOP=.TOP
> .PARENT.CONTROLS(mct+1).ENABLED=.T.
> .POPNUM=mct+1
>ENDWITH
>
>Any better idea instead using Controls number ??
kenweber
GCom2 Solutions
Microsoft Certified Professional