Label_ 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:

 

AutoSize = .T.

 

BackStyle = 0

 

Caption = “Label_1”

 

Comment = “”

 

FontBold = .F.

 

FontSize = 9

 

Height = 17

 

Name = “label_”

 

Width = 47

 

Custom Properties:

 

cCSControlID = “”

The two-character ID used to identify the control when setting up Control 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.

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_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_lOverrideToolTipText = .F.

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

lOverrideCaption = .F.

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

lOverrideLeftAlignment = .T.

If .T., the Alignment property is 0 (left), and the Caption is updated with the latest label (long description) from the DD or a translated string when using the multilingual functionality, maintains the current right alignment.

lRemoveWithControl = .T.

If .T. and the label’s associated control is removed because of Field Security, this label will also be removed.

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.

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.

LabelWidth

Returns the width of the label control based on the current value in the Caption property. This method is used when repositioning a label when the Caption is changed, prior to VFP adjusting the Width property if AutoSize is set to .T..

 

More:

Label_Group Class Properties and Methods