"Read" Mode and Controls

"Read" Mode Usage of PageFrames and Pages

Whenever the FormSet WindowType = 2 or 3, there must be a PageFrame containing at least one Page control on each Form in the FormSet. Each Page in the PageFrame represents one read level. Therefore, if there is one read level on the form, there should be one Page in the PageFrame, if there are two read levels, there should be two Pages in the PageFrame, and so on. The controls contained within each Page are the controls that will participate in the read level specified by the Page. Page1 is read level 1, Page2 is read level 2, and so on.

When a program issues any @ ... GETs, Visual FoxPro will create a PageFrame, if one does not already exist, and a new Page to handle the new read level. The @ ... GETs will be controls contained within the newly created Page. When the READ statement is issued, the Page and its contained controls will become active. Once the READ terminates, the Page created for the read level will be destroyed, along with the controls created by the @ ... GETs. If the PageFrame was created for the Page (i.e. the Page was Page1), it will also be destroyed.

Control Properties and Events

@ ... SAYs, @ ... GETs, @ ... EDITs, @ ... TOs and their FoxPro 2.x settings are mapped to Visual FoxPro controls. @ ... snippet code from FoxPro 2.x is mapped to the corresponding control event code in Visual FoxPro.

Control Properties (Core Set)

Visual FoxPro Control Property

FoxPro 2.x Equivalent

Functionality

Top

Vertical Position

Specifies the top-most edge of the control.

Left

Horizontal Position

Specifies the distance between the left edge of a the control and the left edge of its container object.

Height

Height

Specifies the vertical dimension of the control.

Width

Width

Specifies the width of the control.

Format, InputMask

Picture

Format: Mimics the behavior of the FUNCTION clause for the @ ... GET and @ ... EDIT commands.

InputMask: Specifies the data-entry rule for each character entered in the control.

FontName

FontFace

Specifies the name of the font used to display text.

FontBold, FontItalic

FontStyle

Specify that text is either Bold or Italic.

FontSize

FontSize

Specifies the font size for text displayed with an object.

Caption

Label Expression (Expr)

Specifies the text displayed in an object's caption.

BackColor

FillColor

Specifies the background color used to display text and graphics in an object.

ForeColor

PenColor

Specifies the foreground color used to display text and graphics in an object.

BackStyle

Mode

Specifies whether the background of an object is transparent or opaque.

Alignment

Text Alignment

Specifies the alignment of text associated with a control.

Name

Name

Specifies the name of the control.

ControlSource

Name

Specifies the source of data to which an object is bound.

Enabled

.not. Disabled

Specifies whether an object can respond to user-generated events.

TerminateRead

Terminate READ on Selection

Specifies whether or not the READ command is terminated when a control receives the focus.

Value

Initial Value

Specifies the current state (value) of a control.

SpinnerHighValue

Maximum (Tag2)

Specifies the highest value that can be entered into a Spinner control by clicking on the up arrow.

SpinnerLowValue

Minimum (Tag)

Specifies the lowest value that can be entered into a Spinner control by clicking on the down arrow.

BorderWidth

Pen Size

Specifies the width of a control's border.

DrawStyle

Pen Pattern

Specifies the line style to use when drawing with graphics methods.

FillStyle

Fill Pattern

Specifies the pattern used to fill Shapes and figures created with the Circle and Box graphics methods.

Stretch

Scale Picture

Specifies how an image is sized to fit inside an Image control.

Style

Picture Check Box

Specifies the style of a control.


Note: Option buttons are converted to Option Groups, Command buttons are converted to Command Groups.

Control Events

Visual FoxPro Control Event

FoxPro 2.x Equivalent

Functionality

When

When

Occurs before a control receives the focus.

Valid

Valid

Occurs before a control loses the focus.

Message

Message

Displays a message in the status bar at the bottom of the screen.

Error

Error

Occurs when there is a run-time error in a method.

RangeHigh

RangeHi

TextBox, Spinner low range, ListBox, ComboBox 1st Element

RangeLow

RangeLo

TextBox, Spinner high range, ListBox, ComboBox # of Elements