定义显示表
定义显示表主要有三步:
• 配置显示表的布局,包括标题和数据列区域
• 指定标题区域中的数据
• 指定数据列区域中的数据
下面列出的是用于定义显示表的示例:
{
This is the Macro 'DTABLE1' to define a display table called 'Mach_Op'
which maps to the user table 'Mach_Op'. The user table and display table
are called by the same name 'Mach_Op' in this example, but they can be
different.
It then specifies the layout of the title and data areas of the display
table, and also specifies the data and their formats to put into the
title and data areas.
}
DEFINE DTABLE1
TABLE_LAYOUT 'Mach_Op'
'Mach_Op'
WHITE BLACK
width 60.250000 rows 10.058824
FRAME_WIDTH 2
HORIZONTAL WHITE SOLID
VERTICAL WHITE SOLID
SCROLL_BAR WHITE BLUE 32
TITLE_LAYOUT
18 ' '
1 ' '
END
COLUMN_LAYOUT
' '
END
TABLE_TITLE 'Mach_Op'
BLACK YELLOW '@s1' '' 1 1
WHITE WHITE '' '' 2 1
END
TABLE_COLUMN 'Mach_Op'
COLUMN 1 GREEN BLACK 1 FORMAT 10 LEFT '@v1'
END
END_DEFINE
可以使用文本编辑器创建上述内容。但是如果您已具有布局与所需布局类似的显示表,使用 SAVE_TABLE 命令将该显示表的上述内容保存至文件中会更加方便。然后使用文本编辑器将文件编辑为所需的布局。
创建完此列出内容后,会将其保存在文件 dtable1.mac 中。