home *** CD-ROM | disk | FTP | other *** search
-
-
- April 25, 1993
-
-
- VBDGrid - (C) Copyright 1993 Robert R. Smith, All Rights Reserved
-
- Program and documentation written by:
-
- Robert R. Smith
- 3812 Red Bud Drive
- Imperial, MO 63052-1161
- CIS 72447,2643
-
- A Spreadsheet like data entry and editing facility for Visual Basic for Dos.
-
- This function will provide a flexible data entry library for editing
- columnized information. The uses of this routine will range from roster and
- statisitcs entry to budgeting information as in a spreadsheet. This function
- will in many ways supplement the missing Grid function available in the VB
- for Windows version.
-
- Features:
- - Rows and columns for editing data are limited only by VBDOS array
- limitations.
- - Automatic vertical and horizontal scrolling when next row or column
- is accessed.
- - Definable exit controls to provide hooks for features such as
- next/previous records.
- - Tabs can be locked in for directional preferance.
- - Data in elements can be justified Left, Right or Center.
- - Scrolling can be accomplished by normal cursor keys, PageUp,
- PageDown, End and Home.
-
- Subroutines and Functions:
- - Grid() provides the spreadsheet approach front end for scrolling
- through the data array to enable editing while providing a user
- defined array of exit commands.
- - DefineCol() provides a shortcut method for defining each column.
- Each column should be separately defined.
- - EditWord() provides a full text editor for editing each array
- element and any other data that may be sent to it.
- - PrintCell() is a routine called by the Grid() function to blank out
- the previous displayed element and to highlight the current element
- in it's justified and formatted manner.
- - PrintColHead() is a routine to print the column headings and screen
- title.
- - PrintCurrScn() is a routine to print the entire screens elements
- when the whole page is subject to a position change.
- - PrintRowHead() is a routine to print the row headings. These
- headings may not be changed and will always be displayed on the
- screen.
-
- Structures:
- - ColDefinition defines the editing parameters of each column.
- - RowDefinition defines the editing parameters of each row.
- - CmdDefinition defines the exit commands to be used.
- - ColorInit defines the color scemes to be used.
-
-
-
-
-
- (Page 1)
-
-
-
-
-
- Parameter Definitions:
-
- ReturnCode=Grid(Title AS STRING, Screen Title while editor is active
- RowDef() AS RowDefinition, Array 1 to UBOUND of RowDefinitions
- RowLength, Length of row heading column
- ColDef() AS ColDefinition, Array 1 to UBOUND of ColDefinitions
- CmdDef() AS CmdDefinition, Array 1 to UBOUND of CmdDefinitions
- DataArray() AS STRING, 2 dimensional array of ascii data
- ColorDef AS ColorInit, Color scheme to be used in editor
- ColTotals() AS DOUBLE, Array 1 to UBOUND of ColDefinitions
- SaveRow()AS INTEGER, Active Row in Grid
- SaveCol()AS INTEGER Active Column in Grid
- )
-
- CALL DefineCol (ColDef AS ColDefinition, Column Definition record
- CharType AS STRING, [N]umeric, [A]lphabetic or [D]ate
- Justification AS STRING, [L]eft, [R]ight or [C]enter
- Total AS STRING, [Y]es or [N]o for column total
- Protect AS STRING, [Y]es or [N]o for edit protection
- Length, Width of column
- Description AS STRING, Column help text
- Heading AS STRING, Column heading
- Format AS STRING Any valid Format$ in VBDOS for
- output
- )
-
- CALL EditWord (Row%, Element current row
- Col%, Element current column
- Valid$, Valid characters for input
- FieldLen%, Maximum length of element
- WorkString$, Working string to edit
- GetChar$, Character passed into editor
- FillChar$, Fill Character for padding element
- PassClick% Setinal integer for passing input
- one time to test for exit command
- )
-
- CALL PrintCell (Row%, Starting row for printed string.
- Col%, Starting column for printed string
- Length%, Length of printed string.
- WorkString$, String to be printed.
- Justification$ Justification character as defined
- in column definition.
- )
-
- CALL PrintColHead(TopCol%, First column on active screen.
- ColDef() AS ANY, Column definition as defined.
- RowLength%, Width of column.
- MaxCol%, Maximum columns in data array as
- previously calculated.
- ColorDef AS ANY, Color scheme to be used in editor
- MaxRowHead%, Maximum rows in row definitions
- Title AS String, Screen heading
- Arrows AS STRING Tab direction arrows for display
- at top of screen.
- )
-
-
-
- (Page 2)
-
-
-
-
-
- Parameter Definitions (continued):
-
-
- CALL PrintCurrScn(TopRow%, Top row for active screen
- TopCol%, Leftmost column of active screen
- ColDef() AS ANY, Column definitions
- RowLength%, Row heading column width
- MaxCol%, Maximum columns in data array as
- previously calculated
- MaxRow%, Maximum rows in data array as
- previously calculated
- DataArray() AS STRING, 2 dimensional array of ascii data
- ColorDef AS ANY, Color scheme to be used in editor
- MaxRowHead%, Maximum rows in row definitions
- ColTotals() AS DOUBLE column totals as previously
- calculated
- )
-
- CALL PrintRowHead(TopRow%, Top row for active screen
- RowDef() AS ANY, Row definitions
- RowLength%, Row heading column width
- ColorDef() AS ANY, Column definitions
- MaxRowHead% Maximum rows in row definitions
- )
-
-
- Type Structure Definitions:
-
- TYPE ColDefinition
- CharType AS STRING * 1 [D]ate, [N]umeric or [A]lphanumeric
- Justification AS STRING * 1 [R]ight, [L]eft or [C]enter justified
- Total AS STRING * 1 [Y]es or [N]o - Total for column
- Protect AS STRING * 1 [Y]es or [N]o - Protection against
- editing
- Length AS INTEGER Length of column
- Description AS STRING * 78 Description text for help line
- Heading AS STRING * 20 Description text for column heading
- Format AS STRING * 20 VBDOS Format$
- END TYPE
-
- TYPE RowDefinition
- Heading AS STRING * 40 Description text for row heading
- Total AS STRING * 1 Not Available at this time
- END TYPE
-
- TYPE CmdDefinition
- Extended AS STRING * 1 [Y]es or [N]o - Is key ascii
- extended?
- KeyCode AS INTEGER Ascii decimal code
- Description AS STRING * 20 Description for help line
- END TYPE
-
- TYPE ColorInit
- fc AS INTEGER Foreground color for data
- bc AS INTEGER Background color for data
- hfc AS INTEGER Highlited foreground color for titles
- hbc AS INTEGER Highlited background color for titles
- END TYPE
-
- (Page 3)
-
-
-
-
-
-
- REGISTRATION FOR VBDGRID.LIB
-
-
- NAME:_____________________________________________
-
- STREET:_____________________________________________
-
- CITY:________________ STATE:__ ZIP CODE __________
-
-
-
- SUGGESTED REGISTRATION FEES OUTLINE:
-
- Personal Use: --------------- FREE
-
- Light User: ----------------- $ 5.00
-
- Moderate User: -------------- $10.00
-
- Heavy User: ----------------- $15.00
-
-
- Please send registration form to:
-
- Robert R. Smith
- 3812 Red Bud
- Imperial, MO 63052-1161
-
-