VFP: Setting default form/form element properties 
Author Message
 VFP: Setting default form/form element properties

I need to know how to change the default properties on a form.

For instance - I want all of my fields, labels etc to be MS Sans Serif
Non-Bold 12 pt instead of the default (Arial Bold 10pt).

Any ideas? Form design is tedious enough without having to reset values
for everything!
--
LJ
----------------------------------------------------------------
I keep pressing the Esc key, but I'm still here...
----------------------------------------------------------------
The opinions expressed here are strictly my own and do not
necessarily reflect the opinions of my employer.
----------------------------------------------------------------



Sat, 25 Jul 1998 03:00:00 GMT  
 VFP: Setting default form/form element properties

Quote:

>Makes a lot of sense.  But how about grids and container classes in
>general.  If would make a 'myGrid', you are stuck with the number of
>columns are you not, because if you want to add to it the created columns
>are base classes.   Or am I missing something?

On the face of it, it does seem daft to create a foundation class of an
empty grid (as you say you can't really include any columns so they have
to be added when you instantiate the grid).  However there is a lot of
functionality you could add to your grids which would be nice to have
available to any grid subclasses or objects.  For example StepUp (they
produce a very excellent set of foundation classes for VFP) include for
their grid foundation class dynamic color methods as well as summing of
and sorting by columns (you include a command
soGrid.SortOnColumn(oColumn[, nDirection]) in the click method of the
column header and - hey presto - instant {*filter*} functionality).

Though I have a single foundation form class form it does not have much
more functionality than the VFP form base class (I put a few things like
SET TALK OFF etc. in the load event).  I have then subclassed this for
more specialist form classes. For example a splash screen (no title bar),
a data entry form with a page container, one without a page container, a
dialog box form etc.  However I see that StepUp includes some very nice
methods with their foundation forms classes.  For example
save_screen_position (so when you next open the screen it shows in the
same spot), automatically setting the form color to the current windows
standard scheme, autosizing controls for changing form size.  Now the
point of my having my own form base class.  I can go back and add
functionality like that to all my forms by adding it to my single
foundation class.

The m{*filter*}of this tale is - subclass now for tomorrow you know not what
you want to add to *all* your project objects in one quick go.

Now if only I could find some way to subclass grid columns :-(

Cheers

Mike



Sun, 26 Jul 1998 03:00:00 GMT  
 VFP: Setting default form/form element properties

Quote:

>I need to know how to change the default properties on a form.

>For instance - I want all of my fields, labels etc to be MS Sans Serif
>Non-Bold 12 pt instead of the default (Arial Bold 10pt).

>Any ideas? Form design is tedious enough without having to reset values
>for everything!

You do NOT want to EVERY use MS Sans Serif for ANYTHING in FP or VFP!
This is one of the biggest problem causers in FPW as MS Sans Serif
changes it fontmetrics() based on the screen mode.  This can cause
real problems unless you use NOTHING else but it, and on top of that,
SOME sizes don't resize while others do.

--
**************************************************************
* Cy Welch                              All views are my own *

* http://www.calweb.com/~cwelch/    Web Page                 *
**************************************************************



Wed, 29 Jul 1998 03:00:00 GMT  
 VFP: Setting default form/form element properties

Quote:

>I need to know how to change the default properties on a form.

>For instance - I want all of my fields, labels etc to be MS Sans Serif
>Non-Bold 12 pt instead of the default (Arial Bold 10pt).

In FPW, I'd open up the file as a data table.  If I had a screen called
AGINGRPT, I'd enter USE AGINGRPT.SCX.  Then based on a field I was
needing to change...in your chase FONT...I'd do a REPLACE FONT WITH
ARIAL FOR NOT EMPTY(FONT)...then close it.  

In VFP there most likely is a difference in approach.  But maybe the
logic remains the same...if it does the fix could be quite simple.



Thu, 30 Jul 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VFP 3.0 Form - Setting OptionGroup Default Button

2. List boxes in VFP 6.0 - selected property won't set in form's init

3. VFP 3.0b - Re-setting Default properties of inherited objects

4. Setting defaults on a new record in a form

5. Form Designer Colors - Default to Windows settings?

6. Using a form to set class properties

7. Setting a property of another form

8. Setting form properties

9. How to set a default value of a property inside a class

10. Setting default property values for Grids

11. Default properties setting

12. Release form problem (after filling form property)

 

 
Powered by phpBB® Forum Software