Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quick form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00572149
Message ID:
00572169
Vues:
36
>>>>Hi everybody,
>>>>
>>>>When I need to create a form based on some table I use the following trick:
>>>>
>>>>1) I place table in DE (when I'm done, I remove it, because I always prefer to open them programatically).
>>>>
>>>>2) I drag and drop fields.
>>>>
>>>>3) I rename labels, fields, set autosize for labels to .t.
>>>>
>>>>4) I open form as a table and change classes from base classes to my classes.
>>>>
>>>>3 and 4 are tedious... I probably can adjust field mappings in Option/Tools, but I don't want to make them permanently, because my classes could change, etc.
>>>>
>>>>Do you know another trick to simply create forms?
>>>>
>>>>Thanks in advance.
>>>
>>>For 3 and 4 you could simply click on any control on form go to command window and run your nonregistered builder (or even write select block and execute) :
>>>
>>>aselobj(aForm,1)
>>>aForm[1].Setall('Autosize',.T.)
>>>etc
>>>
>>>Cetin
>>
>>Oops. I used this technique for grids, but haven't thought about using it here... I'll probably write a simple Builder to convert names, classes, etc.
>
>Are you sure that it is more work to remap the classes from time to time, then manually change them hacking the SCX?

I don't know. I tried the following program, but it doesn't work:
********************************************************************
*  Description.......: FormBuilder
*  Calling Samples...: 
*  Parameter List....: 
*  Created by........: Cetin Basoz 
*  Modified by.......: Nadya Nosonovsky 10/23/2001 01:11:58 PM
********************************************************************
aselobj(aForm,1)
for each oObj in aForm
 do case
   case oObj.class = 'label'
      oObj.class = 'wglabel'
   case oObj.class = 'text'
      oObj.class = 'wgtext'
   endcase   
   *oObj.classlibrary = '..\commonwg\classes\wgcontrols.vcx'
next
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform