Navigation:  Reference > Form Objects >

TTASDGColTemplate

Print this Topic Previous pageReturn to chapter overviewNext page

 

This is a duplicate of the TTASDGItem (Columns) in a TTASDataGrid object.  Through the use of this object you can add to or update an existing grid through the use of the DATA_GRID command.

 

PALETTE ICON & EXAMPLE

 

 

PROPERTIES

The following are the properties that apply to this object.  Some are defined in Common Properties and are linked to their appropriate page.

 

Appearance

 

Alignment

Color

 

Font

 

Font

 

Misc

 

Name

 

Other

 

BorderPenThis is the color, mode, style and width of the border around the cell.  The colors (clScrollBar to clWhite), modes (pmBlack to pmNotXor) and styles (psSolid to psInsideFrame) are defined in COMPILERCONSTANTS.TXT.  These properties can be modified at runtime by referring to the property as 'BorderPen.Style', 'BorderPen.Color' or 'BorderPen.Mode'.  The Width is an integer value that specifies the size of the border in pixels.  The default value is 1.

 

BordersYou can specify a special border that fits around the cell.  This would be instead of the normal grid lines.  You can choose any or all of the four sides of the cell by checking the appropriate option.  The default values for each option is unchecked.

 

CharCaseThis can be used to force all the characters entered by the user to be in upper case (ecUpperCase), lower case (ecLowerCase) or just the way the user enters them (ecNormal - the default value).

 

ComboItemsIf the Editor property value is edComboEdit or edComboList then this is the line items in the drop down box.  You can modify this list during runtime by using the COMBO_ITEM command or the STRINGS() function.

 

ComboItemsSortIf there are strings in the ComboItems property by checking this option they will be sorted when the user clicks on the drop down arrow.

 

DecimalChrsIf the Editor property value is edNumeric then this is the number of decimal characters in the field that will be displayed for the user.

 

EditLengthThe maximum number of characters the user can enter for this column.  If you have connected this to a field in your program with the FieldName property then this will be set automatically when the program runs to the size of the field.

 

EditMaskThis will control the structure of the field that can be entered.  An Edit Mask Property Editor can be accessed by clicking on the button in the property field.

 

EditorWhat type of editor to use for this column if the user is going to be allowed to edit the field value.  The options are:  edCheckBox (displays a standard check box in the cell), edComboEdit (allow the user to either enter a value directly into the field or choose a value from the drop down box), edComboList (user may only choose a value from the drop down list, not allowed to enter directly into the field), edDateEdit (use this for date fields, has an integrated calendar), edDefault (a simple text entry editor - the is the default value), edEditBtn (put a button on the right side of the entry field - see CLICK in events below), edInteger (enter an integer value - B, I or R types), edNumeric (enter a decimal value - N type), edPassword (don't let anyone watching the screen see the entry the user is making - the password character is specified in TTASDataGrid), edSpinEdit (an up/down spin object that can be used for integer values), edTimeEdit (use this for entering time fields).

 

ElapsedTimeIf Editor property value is edTimeEdit you can check this property if you want to keep track of the number of seconds in hours:minutes:seconds.milliseconds type format.  If the Editor is set to edTimeEdit and this property is not checked then the program assumes that you're entering actual time.

 

FixedIf you want this column to display as a fixed column in the grid then check this property.  This will also make the values read-only.

 

FormatOnEnterIf the Editor property value is edNumeric then the number will stay in display format when it is being editied.

 

HeaderThe text to be displayed in the header (FixedRow) for this column.

 

PasswordThis will also set the editor into password mode (see edPassword above in Editor).

 

ReadOnlyIf you don't want the user to be able to make any changes to values in this column then check this option.

 

SpinMaxIf the Editor property value is edSpinEdit then this is the maximum value the user can enter for this column.

 

SpinMinIf the Editor property value is edSpinEdit then this is the minimum value the user can enter for this column.

 

SpinStepIf the Editor property value is edSpinEdit then this is the amount that will be incremented/decremented each time the user clicks the up or down arrow in the column.

 

TimeFieldTypeIf the Editor property value is edTimeEdit then this determines the format of the time displayed. NOTE:  If the field is defined differently then the value entered here the object will default to the value entered here.

 

 

Position

 

Width

 

TAS Pro

 

AllowedChrsYou can specify the characters that are allowed to be entered for this object.  Do not separate the values with commas, for example, if you want to allow A, B and C only you would make this property: ABC.  Default value is blank.  This can be changed at runtime.

 

DfltValueThis is the value that will be used as the default if, when the user accesses this field, no other value exists this will be set as the Text value.  The user can then change the value if desired, or leave it alone and move to the next object.  If you want to specify a value for this property it can be any string of characters.  Do not include quotes.  The default value is blank.  This can be changed during runtime.

FieldName

HelpStatusBar

HelpStatusBarMsg

KeyTrapHint

KeyTraps

OnChangeLabelThis label is called every time the user makes a change to the data of this column.  That includes entering a new character, deleting a character, etc.  Each time this label is called the field that is attached to this column through the FieldName property is updated so that you can check the characters entered, modified, etc. through the field.  Be cautious about using this since it will slow down the entry process.  The is the equivalent of the CHANGE event.

 

OnClickLabelIf the column uses the edEditBtn editor this label is called when the user clicks on the button that appears in the cell during editing.  This is the equivalent of a CLICK event for a TButton object.

 

PostLabelThis label is called when the user moves from the current column to another.  This will not stop the process from continuing, but can be used to make sure settings are proper after leaving the object.  To force the user to stay on the current object, if there is a problem, use the Valid event instead of this.  This is the equivalent of the POST event.

 

PreLabelThis label is called when the user moves into a column.  If you call this label you must return .True. or .False. when you return (RET) from the routine.  If you return .True. the user is allowed to access the column.  If you return .False. the column that was active before they got to this column will get the focus again.  This keeps the user from accessing an column that you don't want to be active.  Commonly used in application where some fields are accessible sometimes (RET .TRUE.) and aren't others (RET .FALSE.).  This is the equivalent of the PRE event.

ValidCheckOnExit

ValidExpr

ValidMsg

 

COMMENTS

Each one of these properties can be modified during runtime.

 

NOTE:  If you want to use an expression as the field value in a grid column, including an array specifier, you must use a DEFINEd field with a VALUE option.  For example, if you want to display two fields added together as a column value you add the following to your program:

 

DEFINE tempFld type I size 5 value fld1+fld2

 

Then you would use tempFld as the FieldName in the column.  When it is displayed it would execute the value expression.

 

EVENTS

Events for a standard TTASDataGrid and the associated Columns are setup when the form is loaded.  Because of that you must define the labels to be called in the properties above.

 


Page url: http://www.cassoftware.com/tas/manual/ttasdgcoltemplate.htm