Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quick form
Message
De
23/10/2001 18:37:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00572149
Message ID:
00572361
Vues:
33
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>>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
>
>CLASS is Read-Only property :((( So, this technique would not work, and I still have to hack :(

Nadya,
You were close. I fall into second category of Dragan's developers but believe me it doesn't take 3 days maybe 30 mins and reusable :)
Yes class is readonly but you simply copy nondefault PEM, removeobject, addobject from your class and restore PEM.
If we wouldn't use some commands why they ever existed - aselobj, readexpression, readmethod, writemethod, cloneobject etc:)
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform