Navigation:  Reference > Form Objects >

TTASDGItem

Print this Topic Previous pageReturn to chapter overviewNext page

 

There is no separate item on the palette for this object.  This is created when editing a TTASDataGrid and are the Columns property.

 

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.  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 edited.

 

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

ValidCheckOnExit

ValidExpr

ValidMsg

 

COMMENTS

None of these properties can be changed at runtime.  To do so you must use the TTASDGColTemplate and the DATA_GRID command to update an existing column in a grid.

 

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

This object has events that are called depending on what the user does.  The events are routines in your program that may return a value (generally .True. or .False.) or just alert your program that something is happening.  An event looks to your program for a special label.  It is made up of the object Name, a period (.) and the Event name (listed below).  For example, the Change event below would be: ObjectName.Change:

 

ChangeThis event 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 event is executed 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.

 

ClickThis event is called if the user clicks the button on the cell (the Editor property value is edEditBtn).

 

DispThis event is called when the field that is attached to the column is to be refreshed on the screen.  This can happen when a record is read, after a calculation, etc.

 

PostThis event 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.

 

PreThis event is called when the user moves into a column.  If you use this event 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 process will continue with the next column until one is found where the PRE event returns .True.  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.).

 

The process by which these events are called is:

 

Pre - This occurs when focus changes to the object.

Change - During field entry.

Post - Called after Valid returns .True. (if there is a Valid event) and before the Pre for the next object.

 

Disp - Is called anytime the form/object is refreshed.

Click - Is called anytime the user clicks the button (edEditBtn only).

 

NOTE : Be cautious about running commands that change the grid with these events. If unexpected behavior occurs, consider this: While the dgItem event procedure is running, the grid remains in control. Thus if you change the grid before it finishes and returns control to the program, strange things can happen.

For example: wListM Redisplay* (any variation) How can the grid redo its display while stilling running a post event for a dgItem?

 

 

 

 

 


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