OVERVIEW.............An Overview of the Database Browse Editor
FIELD CONFIG.........Editing the Browse Field (Column) Properties
SAVE CONFIG..........Saving the Browse Configuration to a file
LOAD CONFIG..........Loading a Browse Configuration from a file
COLUMN CONFIG........Sizing, Deleting, Inserting, Moving, Locking columns
OVERVIEW
An Overview of the Database Browse Editor
Description:
The Browse Editor is basically a set of tools that are
invoked by Hot-Keys, menu selections, or the mouse while
browsing a database or a group of related databases. The
database Browsing system is truly a "living application"
because it allows the user and/or programmer to design the
Browse configuration while working with live data. The design
tools give the user the ability to establish the following
user-configurable Browse parameters:
1. Column (Field) order
2. Column locking
3. Screen window size and location
4. Column descriptors
5. Custom user-defined pull-down menu
6. Custom user-defined hot-keys
7. Column Data-Entry validations
8. Column display properties, i.e. pictures, colors, etc.
9. Field encryption
10. Column totalling
11. Column scoping
12. One-to-many relations
13. Tile-browsing
When designing a browse screen, the database that will be used
during browsing must also be in use when using the Browse
Editor. It should be understood that there is NO difference at
all between the Browse Editor and the actual Browse Program
other than the fact that the programmer is given the option of
disabling hot-keys and menu items when in actual Browse mode by
loading a custom menu and/or key group or by passing a parameter
to the DC_BROWSEDB() function.
Both the Browse Editor and the Browse System are invoked by the
command BROWSE from the dot-prompt or by the function
DC_BROWSEDB() in your application code.
See Also:
dc_browsedb()
BROWSE
FIELD CONFIG
Editing the Browse Field (Column) Properties
Description:
To ADD a new column to a browse screen, press ALT-F4
while in the Browse system. This will create a new field
field column that will be placed "last" in the column list.
To INSERT a new column into the browse screen, press ALT-F5.
This will create a new column that will be placed in front
of the currently selected column.
To MODIFY an existing column in the browse screen, first
select the desired column by clicking on it with the mouse
or navigating to the column with the keyboard keys. Then
press ALT-F2.
To BROWSE all columns using a column browser menu, press
ALT-F3.
Each field item in a Browse configuration has a set of
"properties" associated with the column. Some of these
properties are defined in the Field Spec. Editor, while
others are defined in the Browse Spec. Editor. The Field
Spec Editor assigns the "global" properties, ie, those that
are specific to the entire application, such as Field Name,
Type, Encryption codes, etc. The Browse Spec. Editor
assigns properties that are specific to a particular Browse
configuration, ie, column location, headings, colors, etc.
Those properties which were defined at the field spec level
are displayed, however they are not editable.
A database field may occur in more than one place in a
browse screen, however, it can occur only once in the actual
database.
FIELD NAME or EXPRESSION
This may be the the name of a REAL FIELD or any expression
to create a VIRTUAL FIELD. Press (CTRL-ENTER) or double-
click the mouse for a pick-list of real fields for creating
the expression. If a single field name is entered or
chosen, then it will also have the options of being an
editable field, otherwise it will be considered for
display only.
FIELD TYPE
The Field Type will be calculated and filled in
automatically.
FIELD LENGTH
The field length will be calculated and filled in
automatically.
FIELD DECIMALS
The field decimals will be calculated and filled in
automatically.
DESCRIPTOR
Enter a Descriptor that will appear in the data-entry
screens. To break up the descriptor into multiple lines
on the screen, use semi-colons (;).
EDITING ALLOWED?
Click the mouse in the check area or press (ENTER) to toggle
the check mark. When checked, this entry will allow this
field to be edited in the data-entry screen, otherwise the
field can only be viewed.
EDIT OPTION LIST
Enter a series of characters defining any special editing
options for this field when editing the field in the
data-entry screen.
A - Capitalize First Character of each word
D - Pop Up a Date Calendar
C - Pop Up a Calculator
H - Hide Input from Displaying
P - Protect from Editing
F - File Pick-List
HEADING COLOR
Enter a color string defining the color of the heading
for this field column in the browse screen. Double-click
the mouse or press (CTRL-ENTER) for a color-table pick-
list.
COLUMN COLOR
Enter a color string defining the color of the column
contents (data) for this field in the browse screen.
Double-click the mouse or press (CTRL-ENTER) for a color-
table pick-list.
HEADING PRINT
Enter a series of printer pseudo-codes to establish how
you want this heading printed when printing an image
of the browse screen. Double-click the mouse or
press (CTRL-ENTER) for a pick-list of printer codes.
COLUMN PRINT
Enter a series of printer pseudo-codes to establish how
you want the column contents (data) printed when printing
an image of the browse screen. Double-click the mouse
or press (CTRL-ENTER) for a pick-list of printer codes.
COLUMN WIDTH
Enter the number of character columns to display for this
column. The column width may be as small as 1 and as
large as 999.
TOTAL THIS COLUMN
Click on the check area or press (ENTER) to toggle the
check mark. When checked, the totals for the browse
column will be displayed at the bottom of the browse
screen. NOTE: On large database this can delay the
painting of the browse screen while the totalled columns
are being calculated. Preset filters, conditional
indexes or scoping conditions will be used when calculating
the totals. If the column is not numeric, then this
check-mark will be ignored.
See Also:
BROWSE
dc_browsedb()
SAVE CONFIG
Saving the Browse Configuration to a file
Description:
After designing a database Browse configuration, the current
configuration, including column locations, window location,
selected column, etc. can be saved to the DCBROWSE.DBF
dictionary, an array file, or source code, for later retrieval
by the editor or the application program.
To save the Configuration to the Browse dictionary, an array
file, or source code, select (F), (C) and (S) from the pull-
down menu.
A dialogue window will appear with several options for
saving the configuration and information that must be
entered by the programmer. Enter the following information:
BROWSE DESCRIPTION
Enter a brief description of this Browse configuration.
This description will appear in the pick-list when choosing
a configuration to load.
BROWSE TAG NAME
Enter a unique name of up 8 characters for this configuration.
This name is used to group all the information together in
the DCBROWSE.DBF database and also as a reference for
restoring Browse configurations from functions in your source
code.
FILES TAG NAME
Enter an optional tag name of any data FILE GROUP you want to
restore before restoring the Browse configuration. This must
be a valid tag name in the DCFILES.DBF dictionary file. For a
pick-list of pre-established file groups, press the CTRL-ENTER
key. All databases, indexes and relations included in this
file group will be opened before attempting to paint the
Browse screen.
MENU TAG NAME
Enter an optional tag name of any Menu you want to attach to
the Browse screen. This must be a valid tag name in the
DCMENU.DBF dictionary file. For a pick-list of menus, press
the CTRL-ENTER key. After painting the Browse screen, the
default menu will be replaced by this menu. It is recommended
that you create replacement Browse menus in the Menu Editor by
first loading the template menu for the Browse system saved in
the DCMENU.DBF dictionary file under the tag name "DCBROWSE",
modifying the menu as desired, then saving it under a new tag
name.
CAUTION: It is possible to load a menu that will not allow
access to even the basic functions of the Browsing
system because they may have been re-defined. The
built-in (default) menu can be restored at any time
by pressing the ALT key simultaneously with the =
key.
KEYS TAG NAME
Enter an optional tag name of any Key Group you want to attach
to the Browse screen. This must be a valid tag name in the
DCKEY.DBF dictionary file. For a pick-list of key groups,
press the CTRL-ENTER key. After painting the Browse screen,
the selected key group will be loaded. It is recommended that
you create replacement Browse Key Groups in the Key Editor by
first loading the template group for the Browse system saved in
the DCKEY.DBF dictionary file under the tag name "DCBROWSE",
modifying the group as desired, then saving it under a new tag
name.
CAUTION: It is possible to load a key group that will not
allow access to even the basic functions of the
Browsing system because they may have been re-defined.
The built-in (default) key set can be restored at any
time by pressing the ALT key simultaneously with the
= key.
EDIT TAG NAME
Enter an optional tag name of any Data-Entry configuration you
want to associate with this Browse screen. This must be a
valid tag name in the DCEDIT.DBF dictionary file. For a pick-
list of Data-Entry configurations, press the CTRL-ENTER key.
After painting the Browse screen, selection of EDIT RECORD(s)
from the EDIT menu will cause this configuration to be loaded
when performing data-entry. If no Edit Tag Name is entered,
then any current data-entry configuration that has already
been loaded in memory for the same work area will be used. If
no Data-Entry configuration is currently loaded, then the
default Data-Entry configuration for the selected database
will be used.
CURRENT WORK AREA / ALL WORK AREAS
Select CURRENT WORK AREA if the Browse configuration you are
saving is related to the database in the currently selected
work area only. Select ALL WORK AREAS if the Browse
configuration is a set of windows for multiple work areas.
SAVE TO DICTIONARY
Check this box if you want to save the current configuration
to the DCBROWSE.DBF Browse Dictionary.
CAUTION: Any configuration in the DCBROWSE.DBF dictionary with
the same name as the tag name entered will be
overwritten. If you do not want to overwrite an
existing configuration, make sure to assign a unique
name.
SAVE TO ARRAY FILE
Check this box if you want to save the current configuration
to an array file. The default name for this file will be
the Browse Tag Name with the .DBR extension. When restoring
Browse configurations, the SET DCLIP directory will be
checked for a file with this name and this file will be used
to restore the configuration rather than the configuration in
the DCBROWSE.DBF dictionary.
WRITE SOURCE CODE
Check this box if you want to write out a source code .PRG
for restoring this configuration. The .PRG will contain a
function which will return an array that is basically a
clone of the current Browse configuration. The default name
for the function will be the Browse Tag name followed by
_B(). When restoring browse configurations, the application
will be tested for the existence of this function and the
function will be called to restore the configuration rather
than the configuration in any array file or in the
DCBROWSE.DBF dictionary.
See Also:
dc_browsedb()
BROWSE
dc_browsave()
LOAD CONFIG
Loading a Browse Configuration from a file
Description:
Database Browse configurations that have the same tag name
as the ALIAS of the selected work area will automatically be
loaded the first time the BROWSE command is used or the
DC_BROWSEDB() function is called in an application.
To restore a Browse configuration with a tag name that is not
the same as the current work area alias, use the command
BROWSE RESTORE [(cTagName)] from the dot-prompt or call the
function DC_BROWSEDB() in your application code with the 7th
parameter passed as a character string containing the name of
Browse configuration to restore. If the configuration being
restored DOES NOT not reference a FILES TAG NAME for opening
databases, then all databases accessed by the configuration
must already be opened and any required relations must already
be set. You may choose to do this by restoring work areas
using the RESTORE WORK command or the DC_WORKRESTORE() function
or by individually opening databases and indexes with commands
from the dot-prompt.
If the configuration being DOES reference a FILES TAG NAME,
then all files associated with the tag name will be opened
before painting the Browse screen.
When configurations are restored automatically, with the
BROWSE RESTORE command, or by a parameter passed to
DC_BROWSEDB(), then the DC_BROWRESTORE() function that passes
the Browse configuration back to the Browse system will restore
configurations by the following priority:
1. The application code is tested to see if a function exists
with the same name as the BROWSE TAG NAME followed by _B().
If this function exists, then it is called to retrieve the
configuration. This is the fastest method of restoring a
Browse configuration.
2. The SET DCLIP directory is checked to see if a file exists
with the same name as the BROWSE TAG NAME followed by .DBR.
If this "array" file exists, then it used to restore the
configuration.
3. The DCBROWSE.DBF dictionary is checked to see if a
configuration exists with the BROWSE TAG NAME. If it exists,
then it is used to restore the configuration.
4. If no configuration function, array file or group exists
in one of the above, then the Browse screen will be painted
using a standard default configuration with all fields
displayed in scrollable columns.
To restore a Browse configuration while already in the Browse
editor, select (F), (C), (L) from the menu.
RESTORE FROM DICTIONARY
Select (D) from the last sub-menu to restore a Browse
configuration from the DCBROWSE.DBF Dictionary file. A pick-
list will appear for choosing a configuration. If the chosen
configuration uses the same database(s) as the current work
area then the browse configuration for the current work area
will be updated, otherwise, the selected configuration must
contain a FILES TAG name for restoring work areas first.
If the selected configuration does not reference a FILES TAG
and the database(s) for the configuration are not already
opened, then a warning message will be displayed and the
configuration will not be restored.
RESTORE FROM ARRAY FILE
Select (A) from the last sub-menu to restore a Data-Entry
configuration from a *.DBR array file. Enter the name of the
file or press CTRL-ENTER for a pick-list of files to choose.
See Also:
dc_browsedb()
BROWSE RESTORE
dc_browload()
dc_browrestore()
COLUMN CONFIG
Sizing, Deleting, Inserting, Moving, Locking columns
Description:
MOVING A COLUMN
A column may be moved from any location to any other location
either with the keyboard or the mouse.
To move a column with the keyboard, select the desired column
using the left or right arrow keys, then press ALT-J to "grab"
the column number. Next, select the column in the display
to relocate the "grabbed" column. The column will be placed
in the display directly in front of the currently selected
column when pressing the ALT-K key.
To move a column with the mouse, click the left mouse button
with the mouse cursor over the display row directly below the
column heading and directly above the column data within the
column to move. A box will be displayed for dragging with the
mouse. Do not release the mouse until you have located the
box over the new place in the column list to drop the column.
If the mouse is moved to the left of the window, the columns
will scroll to the left. If the mouse is moved to the right
of the window, the columns will scroll to the right. Release
the mouse when the box is within the target column area.
SIZING A COLUMN
Any column may be sized to a minimum width of 1 display column
any a maximum size of the display width.
To size a column with the keyboard, select the desired column
with the right and left arrow keys then select (V), (B) and
(W) from the menu. Fill in the number of display columns to
use for the selected column width.
To size a column with the mouse, click the left mouse button
with the mouse cursor on the vertical line directly to the
right of the data area for the desired column. A box will be
displayed representing the width of the column. Move the
mouse to the left or right to size the column to the desired
width then release the mouse button.
DELETING A COLUMN
To delete a column from the Browse window, select the desired
column with the left and right arrow keys, then press the
(DEL) key. This action does not affect the database in any
way, only the browse column configuration.
INSERTING A COLUMN OR ESTABLISHING COLUMN ORDER
Often times it is quicker to establish the order of the
columns by working with a column list rather than using drag
and drop methods. To order columns this way, press the (INS)
key. A list of all displayed and non-displayed columns will
appear in a pick-list. A number will appear in front of
each column that will appear in the browse window. The
number is the order of the column in the window. To reorder
columns, use the (INS) key to INSERT a column in the list,
the (DEL) key to DELETE a column from the list, or the
(ENTER) key to add a column to the end of the list. Press
the (A) key to add all remaining columns to the list and
the (R) key to remove all columns from the list.
LOCKING A COLUMN
Locking a column is a procedure that prevents a column from
scrolling off the screen. Locked columns will be placed in
the left of the Browse display and a double-vertical line
will appear to the right of the last locked column. To
lock a column, select the desired column, then select (V),
(C) and (L) from the menu. To unlock a column, select the
already locked column, then select (V), (C) and (L) from
the menu.
See Also:
BROWSE
dc_browsedb()