FILE_TYPE=FORM_DEFN VERSION=2
FORM [form_options]
formtype ; FIXED | VARIABLE; Skill only supports FIXED form types
PORT w h ; 设置表单的宽度(w)和高度(h)
HEADER "text" ; 设置表单title; form_header
[{default_button_def}]
[{popup_def}]
[{message_def}] {tile_def}
ENDFORM
表单选项
form_options:[TOOLWINDOW]- This makes a form a toolwindow which is a floating toolbar. It is typically used as a narrow temp window to display readouts.[FIXED_FONT]- By default, forms use a variable width font. This option sets the form to use a fixed font. Allegro/Apd use mostly variable width while SPECCTRAQuest and SigXP use fixed width fonts.[AUTOGREYTEXT]- When a fillin or enum control is greyed, grey static text to the left of it.[UNIXHGT]- Works around a problem with Mainsoft in 15.0 where a button is sandwiched vertically between 2 combo/fillin controls. The button then overlaps these controls. This adds extra line spacing to avoid this. You should only use this option as a last resort. In a future release, it may be treated as a Nop. On Windows, this is ignored.
Button定义
default_button_def:DEFAULT
POPUP定义
popup_def:POPUP <> {"",""}.- Popups may be continued over several lines by using the backslash (\) as the last character on a line.dispatch- string that is dispatched to the code.
display- string that is shown to user
Message定义
message_def:MESSAGE messageLabel messagePriority "text"messageLabel:- Name used to allow code to refer to messages.- Case insensitive.
messagePriority:- Message priority 0 - (not in journal file), 1 - information, 2 - warning, 3 - error, 4 - fatal (display in message box)
TILE定义
ILE [][TPANEL tileType][{text_def}][{group_def}][{field_def}][{button_def}][{grid_def}][{glex_def}]
ENDTILE
tileLabel:- Name used to allow code to refer to this tile.- Should use lower case.- Only applies to VARIABLE forms.- Not supported with AXL forms.
tileType [0|1|2]- 0 top tile, 1 scroll tile, 2 bottom tile- Only applies to VARIABLE FORMS.- Region where tile will be instantiated. Forms have the following regions: top, bottom, and scroll (middle).- Not supported with AXL forms.
TABSET定义
TABSET [label][OPTIONS tabsetOptions]FLOC x yFSIZE w h{tab_def}
ENDTABSETtabsetOptions:[tabsetDispatch]- By default, tabsets dispatch individual tabs as seperate events.This is not always convenient for certain programming styles.This changes the dispatch mode to be upon the tabset where a selection of a tab causes the event: field=tabsetLabel value=tabLabelThe default is:field=tabLabel value=tScript record/play remains based upon tab in either mode.
TEXT "display" [label] (9)FLOC x y[FSIZE w h] (8)text_type[OPTIONS textOptions]
ENDTEXT
文本类型:
[INFO label w] |
; label:
; - Name used to access a field from code. All fields should have unique names.
; - Labels should be lower case.
[THUMBNAIL [|#] ]
; bitmapFile:
; - Name of a bmp file. Finds the file using BITMAPPATH
; resource:
; - Integer resource id (bitmap must be bound in executable via the resource file). '#' indicates it is a resource id.
; - Not supported in AXL forms.
文本选项:
textOptions:[RIGHT | CENTER | BORDER | BOLD | UNDERLINE]- TEXT/INFO field type- text justification, default is left- BORDER: draw border around text[STRETCH]- THUMBNAIL field type- Stretch bitmap to fit thumbnail rectangle, default is center bitmap.
GROUP定义
GROUP "display" [label] (9)FLOC x yFSIZE w h (8)[INFO label]
ENDGROUP
label定义:
label:- Name used to access a field from code. All fields should have unique names.- Labels should be lower case.
FIELD定义
FIELD labelFLOC x y[FSIZE w h] (8)field_typefield_options
ENDFIELD
label定义:
label:- Name used to access a field from code. All fields should have unique names.- Labels should be lower case.
FIELD类型:
REALFILLIN w fieldLength |
LONGFILLIN w fieldLength |
STRFILLIN w fieldLength |
INTSLIDEBAR w fieldLength |
ENUMSET w [h] | (11)
CHECKLIST "display" ["radioLabel"] |
LIST "" w h |
TREEVIEW w h |
COLOR w h |
THUMBNAIL [|#] |
PROGRESS w h
TRACKBAR w h
FIELD选项:
[INFO_ONLY]- sets field to be read only.
[POP ""]- assigns a popup with the field.- a POPUP definition by the same name should exist.- supported by field_types: xxxFILLIN, INTSLIDEBAR, MENUBUTTON,
ENUMSET[MIN ][MAX ]- assigns a min and/or max value that field might have.- both supported by field_types: LONGFILLIN, INTSLIDEBAR, REALFILLIN.- value by either by an interger or floating point number.
[DECIMAL ]- assigns a floating min and/or max value that field might have.- assigns number of decimal places field has (default is 2)- both supported by field_types: REALFILLIN
[VALUE ""]- initial field value.- supported by field_types: xxxFILLINdisplay:- String that is shown to the user.
[SORT]- alphanumberic sorted list (default order of creation)- supported by field_type: LIST
[OPTIONS dispatchsame]- for enumset fields only.- if present will dispatch to application drop-down selection even if the same as current. By default, the form's package filters out any user selection if it is the same as what is currently displayed.dispatch:- String that is dispatched to the code.
[OPTIONS prettyprint]- for enumset fields only- displays contents of ENUM field in a visually pleasing way
[OPTIONS ownerdrawn]- for enumset fields only- used to display color swatches in an ENUM field. See axlFormBuildPopup.
FIELD labelFLOC x yLIST "" w hlist_options
ENDFIELD
LIST选项:
[OPTIONS sort|alphanumsort|prettyprint|multiselect]sort - convertion alphabetical sort alphanumsort - sort so NET10 appears after NET2 prettyprint - make more readable, convert case.All dispatch entries will be upper case multiselect - multi-select list box. User can select more then one item (follows Microsoft selection model).通过x,y,w和h四个整数表示LIST外形,x和y用于控制位置,w和h用于控制尺寸
x
y
w ; x&h单位按照字符高度的一半
h ; y&w单位按照字符宽度的一半
BUTTON定义
FIELD labelFLOC x y[FSIZE w h] (8)MENUBUTTON "display" w hbutton_options
ENDFIELD
BUTTON选项:
[MULTILINE]- wraps button text to multiple lines if text string is too long for a single line.
CHECKLIST
CHECKLIST有两种类型:
Checkbox
Radiobox
GRID定义
GRID fieldNameFLOC x yFSIZE w h (8)[OPTIONS INFO | HLINES | VLINES | USERSIZE ][POP ""][GHEAD TOP|SIDE][HEADSIZE h|w][OPTION 3D|NUMBER][POP ""][ENDGREADH]
ENDGRID