Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command Button group
Message
From
05/05/2005 09:00:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/05/2005 08:26:18
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01011123
Message ID:
01011248
Views:
21
The form wizard creates forms based on a class. This is part of a relatively primitive framework that comes with Visual FoxPro. I would never use it for any serious applications; its only practical use is to investigate how certain problems are solved - and then apply it to your own programming.

Your options, basically, are: (1) To create your own forms, without using classes (in the short term), and eventually create your own classes; and (2) use an existing framework of classes, freeware or commercial.

The idea of a form class is more or less the following. Several forms need to share common properties. To give a very simple example, that might be the background color, and the icon that appears in the top-left corner. You create a form (create a form and save it as a class), and give this form class the desired attributes. Then, create forms, based on this class.

As a result, you will have several forms that "derive" from a single class. If done correctly, a change in the background color of the form class will propagate to all your forms!

Similarly, you can have buttons or TextBoxes saved as classes, and place copies (instances) of the TextBox classes on your forms. For example, let's say that for money amounts, you use an InputMask of "###,###.##", i.e., two decimals. If suddenly, for any reason, you need to change to zero decimals, or accomodate larger numbers, a change in the class will, again, propagate to all the places where you have used this.

More important, you can also inherit (propagate) methods. For instance, you might need several lines of code in your form to go to the next record, and place this in a method. If you use classes, any correction in this code will get propagated to all forms based on that class. However, some additional adjustments are required to make the code flexible enough, so that it can be used for more than just one specific form.

>Jison,
>
>Thanks very much for your reply, but as I said, I'm very much a VFP rookie. I don't know how what it means to look at the "class created by the wizard then follow the event." Is there a simple way to find what, exactly, is making this new field inaccessible until the "edit" button is clicked? Is there something I can change in the button or in the new field itself? I've opened the "Properties" box for each and searched through every tab (Data, Methods, Layout & Other) but don't see anything that looks like it's having this effect.
>
>Thanks all,
>
>John
>
>>Hi john,
>> when you use wizard in your data entry, it will a class derived from FFC . try check at the ur class created by the wizard then follow the event.
>> Another method it to create a textbox class then drop it on your form. because i guess internally the wizard use setall() your custom class will excempted in this case.but its not a good idea. mudify your class generated by wizard would be better.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform