CheckBox_ Class Properties and Methods

Properties

The following table lists the class properties. The properties listed include the standard Visual FoxPro class properties that the VPM Enterprise class uses and the VPM Enterprise custom properties. Where appropriate, the Comments column of the table describes a property and provides suggestions for its use.

Property & Initial Value

Comments

Standard Properties Used:

 

Alignment = 0

 

AutoSize = .T.

 

BackStyle = 0

 

Caption = “CheckBox”

 

FontBold = .F.

 

FontSize = 9

 

Height = 17

 

Name = “checkbox_”

 

Width = 73

 

Custom Properties:

 

aValidFilterVariables[1,2]

An array that can be filled with the definition of filter variables that will be set before the validation cursor is created, causing records to be excluded from the cursor. The array is a two-dimensional array that defines the variables used in the WHERE clause of a view or cursoradapter’s SELECT statement. Prior to the cursor being created the variables listed in the array are defined using the name from column 1 and the value from column 2.

cAlias = “”

For data-bound controls whose ControlSource property does not include the cursor alias, the developer should fill-in this property with the alias of field’s cursor. It is used for various purposes, including being passed to the validation routine.

cCSControlID = “”

Contains the two-character ID used to identify the control when setting up Control Security.

cEnabledExpression = “”

Can be filled with an expression that is evaluated by the form’s EnableDisableToolbarControls method as each ISA record is displayed. The result of the evaluation (.T. or .F.) is placed in the form/toolbar control’s Enabled property.

cEnabledOnlyWhenNew Expression = “”

Can be filled with an expression that is evaluated by the form’s EnableDisableControls method when the record that is bound to the control is new. The result of the evaluation (.T. or .F.) is placed in the control’s Enabled property.

cFieldSecurityID  = “”

Contains the Field Security ID that is automatically filled-in from the data dictionary in the Init method. Is passed to the When routine to implement view-only Field Security.

cName_DDD = “”

Identifies the DD database/CA library name when different from the database/CA library that can be derived from the alias specified in the ControlSource.

cName_DDF = “”

Identifies the DD field name when different from the field name specified in the ControlSource.

cName_DDTV = “”

Identifies the DD table/view/CA name when different from the table/view/CA alias specified in the ControlSource.

cRightClick_Menu = “S”+_SCREEN.oApp.cCurPre+ ”FCHK.MPR”

Contains the name of the right-click shortcut menu to be run.

cValidFilterExpression = “”

Can contain a filter expression to be applied to the validation cursor that is used to validate the control’s value.

cValidRulesID = “”

Passed on to field validation business rules methods and DD validation code snippets so that validation logic can be conditional if necessary, based on this value.

cWhenExpression = “”

Contains the When expression that is automatically filled-in from the data dictionary by the Init event. Is passed to the When routine.

i_cUse_ID = “”

A two-character ID used by the multilingual functionality to provide for the unique translation of a control’s properties.

i_lOverrideCaption = .F.

Used by the multilingual functionality to bypass the translation of the Caption property value.

i_lOverrideControlSource = .F.

Used by the multilingual functionality to bypass the translation of the ControlSource property value.

i_lOverrideDownPicture = .F.

Used by the multilingual functionality to bypass the translation of the DownPicture property value.

i_lOverrideDragIcon = .F.

Used by the multilingual functionality to bypass the translation of the DragIcon property value.

i_lOverrideFont = .F.

Used by the multilingual functionality to bypass the translation of the Font property value.

i_lOverridePicture = .F.

Used by the multilingual functionality to bypass the translation of the Picture property value.

i_lOverrideStatusBarText = .F.

Used by the multilingual functionality to bypass the translation of the StatusBarText property value.

i_lOverrideToolTipText = .F.

Used by the multilingual functionality to bypass the translation of the ToolTipText property value.

lCenterInColumn = .T.

If .T., and the checkbox is in grid column, causes the checkbox to be centered in the column and the caption to be blanked-out.

lEnableDisableControl = .T.

If .T., means that this control participates in the enabling/disabling of controls by the edit mode.

lEnabledOnlyWhenNew = .F.

If .T., means that the control is only enabled when the record is new, and is disabled after the record has been saved.

lGridOverrideCaption = .F.

If .T., the header caption of the column containing this control will not be overwritten with the grid label (short description) stored in the DD.

lNoWhenOnReadOnly = .F.

If .T., and the checkbox is read-only, causes the When event code to return .F., bypassing the default When routine.

lOverrideCaption = .F.

If .T., the Caption property value of this control will not be overwritten with the label (long description) stored in the DD.

lOverrideFieldSecurity = .F.

If .T., the Field Security functionality will be disabled for this control because the cFieldSecurityID property is not filled in with the ID value stored in the DD.

lOverrideStatusBarText = .F.

If .T., the StatusBarText property value of this control will not be overwritten with the Status Bar Text (Message) stored in the DD.

lOverrideTooltipText = .F.

If .T., the ToolTipText property value of this control will not be overwritten with the ToolTip Text stored in the DD.

lOverrideWhen = .F.

If .T., the cWhenExpression property value of this control will not be overwritten with the When expression stored in the DD.

oActiveForm = .F.

Since controls can be placed on both forms and toolbars, and since calls are made in the methods of this control to methods of the active form, the oActiveForm property will contain the object reference of the active form.

oDDFRecord = .F.

When data is retrieved from an SDATADDF record for this control, the record is saved as an object to this property.

oDDTVRecord = .F.

When data is retrieved from an SDATADDTV record for this control, the record is saved as an object to this property.

Methods

The following table lists the class methods. The methods listed include the standard Visual FoxPro class methods that the VPM Enterprise class uses and the VPM Enterprise custom methods. Where appropriate, the Comments column of the table describes a method and provides suggestions for its use.

Method

Comments

Standard Methods Used:

 

Destroy

Releases the object references stored in the oActiveForm, oDDFRecord, and oDDTVRecord properties.

Init

Identifies the form associated with this control and places the object reference of the form into the oActiveForm property.

Calls the SetControlProperties method of the active form that fills-in generic control properties.

Finds the SDATADDF and SDATADDTV records for this control and fills-in properties specific to this control, including the oDDFRecord and oDDTVRecord properties.

RightClick

Runs the menu specified in the cRightClick_Menu property.

Valid

Runs the field validation routine for the value returned by the IdentifyValidationValue method (by default the value in the Value property of this control).

When

Runs the When routine that returns .T. if this control can receive focus. In determining what value to return, the routine evaluates the When expression from the data dictionary and performs the “Display Only” Field Security check.

Custom Methods:

 

IdentifyActiveForm

Since controls can be placed on both forms and toolbars, and since calls are made in the methods of this control to methods of the active form, this property will contain the object reference of the active form.

IdentifyValidationValue

Called by the Valid event to return the value to be validated. By default, the value in the Value property of the control is returned.

More:

ComboBox Class Properties and Methods