Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a builder to add controls to a class
Message
 
 
À
25/09/1999 21:29:14
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00269016
Message ID:
00269020
Vues:
26
Rex,

aselobj( laJunk, 1 )
loClass = laJunk[1]

will give you a reference to the current outermost object in the class/form designer.

>All,
>
>I use a builder to create composite classes.
>
>The code is as follows:
>
>FUNCTION SubClass
>LPARAMETER tcBaseClass,tcBaseClassLibrary,tcNewClass,tcNewClassLibrary
>
>CREATE CLASS ;
> (tcNewClass) ;
>OF ;
> (tcNewClassLibrary) ;
>AS ;
> (tcBaseClass) ;
>FROM ;
> (tcBaseClassLibrary) ;
>NOWAIT
>
>loObject = .NULL.
>FOR EACH loForm IN _SCREEN.FORMS
> IF UPPER(loForm.CAPTION) # UPPER(tcNewClass)
> LOOP
> ENDIF
> loObject = loForm.CONTROLS[1]
> EXIT
>ENDFOR
>RETURN loObject
>
>I use the loObject reference to change properties and then use
>
>ACTIVATE WINDOW "Class Designer"
>KEYBOARD "{Ctrl+W}"
>
>to close the class designer.
>
>If I create one object, all is well. If I create two objects, neigher Class Designers close.
>
>Is there another way to create an object and store it in a VCX file?
>Is there another way to reference the created object?
>Is there another way to save the class and close the Class Designer?
>
>TIA
>
>Rex
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform