-
Notifications
You must be signed in to change notification settings - Fork 24
Customize CustomBorderColor
This hook enables you to change the border color of the DataDigger window.
Although you can use this in a variety of way, like having a different color for each day of the week, there are also useful scenarios for this. When you use the DataDigger to connect to databases in different environments, you might want to have a visual clue that you are in a certain database. For example, if you connect to a production database. In the example below I check whether a database with 'prod' in the name is connected. If so, the frame will be colored yellow. I also check on sports to show that you need to check for the important connections first.
PROCEDURE customBorderColor:
DEFINE OUTPUT PARAMETER pcColor AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDatabases AS CHARACTER NO-UNDO.
cDatabases = getDatabaseList().
IF cDatabases MATCHES '*prod*' THEN
pcColor = '12'. /* Progress color nr for red */
ELSE
IF cDatabases MATCHES '*sports*' THEN
pcColor = '200,255,200'. /* RGB for light green */
ELSE
pcColor = ?. /* sets to default color */
END PROCEDURE.
See also CustomFrameColor
Please note:
- The function getDatabaseList is a core-DataDigger function that returns a comma separated list of all connected databases.
- Procedure setFrameColor accepts a string that has either a progress color number ('14') or an RGB value ('200,255,200') or an unknown for default coloring.
Normally the DataDigger looks like this:
When I connect to a sports database, the window changes to:
And when I connect a production database:
Also check the blog for the latest news on DataDigger