【221】◀▶ IDL GUI 函数说明
参考:GUI - Dialogs Routines
参考:GUI - Widgets Routines
参考:GUI - Compound Widgets Routines
01 | DIALOG_MESSAGE | 消息框。 | |
02 | DIALOG_PICKFILE | 文件/文件夹选择。 |
序号 | 名称 |
功能说明 |
语法 & 举例 | ||
01 | DIALOG_MESSAGE |
消息框。 ====<<<< Syntax >>>>==== Result = DIALOG_MESSAGE( Message_Text [, /CANCEL] [, /CENTER] [, /DEFAULT_CANCEL | , /DEFAULT_NO] [, DIALOG_PARENT=widget_id] [, DISPLAY_NAME=string] [, /ERROR | , /INFORMATION | , /QUESTION] [, RESOURCE_NAME=string] [, TITLE=string] ) ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为点击的按钮,可能是 “Yes”, “No”, “OK”, and “Cancel”。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>==== ◈ Message_Text:显示的消息文本。 |
IDL> DIALOG_MESSAGE("消息内容", /CANCEL, /CENTER, /INFORMATION, TITLE="我是标题") Cancel
|
||
02 | DIALOG_PICKFILE |
|
文件/文件夹选择。 ====<<<< Syntax >>>>==== Result = DIALOG_PICKFILE( [, DEFAULT_EXTENSION=string] [, /DIRECTORY] [, DIALOG_PARENT=widget_id] [, DISPLAY_NAME=string] [, FILE=string] [, FILTER=string/string array] [, /FIX_FILTER] [, GET_PATH=variable] [, GROUP=widget_id] [, /MULTIPLE_FILES] [, /MUST_EXIST] [, /OVERWRITE_PROMPT] [, PATH=string] [, /READ | , /WRITE] [, RESOURCE_NAME=string] [, TITLE=string] ) ====<<<< Return Value >>>>==== 当未指定 DIRECTORY 关键字的时候,返回值为所选文件的完整路径或者多个路径的数组,没指定文件则返回空字符串;当指定 DIRECTORY 关键字的时候,返回值为所选文件夹的路径数组。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>==== ◈ DEFAULT_EXTENSION:自动增加扩展名。 |
IDL> DIALOG_PICKFILE(FILTER=['*.jpg', '*.tif', '*.png'], GET_PATH=dir, TITLE="我是标题") D:\桌面\QQ截图20160825160811.jpg IDL> dir D:\桌面\
IDL> DIALOG_PICKFILE(/DIRECTORY, TITLE="我是标题") C:\Boot\
|
|
03 | WIDGET_BASE |
====<<<< Description >>>>==== 可以称为容器组件,任何界面必须以 Base 组件为基础界面。 ====<<<< Syntax >>>>==== Result = WIDGET_BASE( [Parent] [, /ALIGN_BOTTOM | , /ALIGN_CENTER | , /ALIGN_LEFT | , /ALIGN_RIGHT | , /ALIGN_TOP] [, /BASE_ALIGN_BOTTOM | , /BASE_ALIGN_CENTER | , /BASE_ALIGN_LEFT | , /BASE_ALIGN_RIGHT | , /BASE_ALIGN_TOP] [, BITMAP=value] [, COLUMN=value | , ROW=value] [, /CONTEXT_EVENTS] [, /CONTEXT_MENU] [, EVENT_FUNC=string] [, EVENT_PRO=string] [, /EXCLUSIVE | , /NONEXCLUSIVE] [, /FLOATING] [, FRAME=value] [, FUNC_GET_VALUE=string] [, /GRID_LAYOUT] [, GROUP_LEADER=widget_id] [, /KBRD_FOCUS_EVENTS] [, KILL_NOTIFY=string] [, /MAP] [, /MASK] [, MBAR=variable | , /MODAL] [, /NO_COPY] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, SCR_XSIZE=value] [, SCR_YSIZE=value] [, /SCROLL] [, /SENSITIVE] [, SPACE=value] [, TAB_MODE=value] [, TITLE=string] [, TLB_FRAME_ATTR=value] [, /TLB_ICONIFY_EVENTS] [, /TLB_KILL_REQUEST_EVENTS] [, /TLB_MOVE_EVENTS] [, /TLB_RESIZE_NODRAW] [, /TLB_SIZE_EVENTS] [, /TOOLBAR] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS=value] [, UVALUE=value] [, XOFFSET=value] [, XPAD=value] [, XSIZE=value] [, X_SCROLL_SIZE=value] [, YOFFSET=value] [, YPAD=value] [, YSIZE=value] [, Y_SCROLL_SIZE=value] ) Motif Keywords: ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回新建容器组件的 ID 值。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>==== ◈ TITLE:用于设置最底层容器组件的标题,也就是窗体标题。 |
|||
04 | WIDGET_CONTROL |
====<<<< Description >>>>==== 过程,可实现组件控制,如组件显示、组件属性设置、属性读取和组件销毁等操作。 ====<<<< Syntax >>>>==== WIDGET_CONTROL [, Widget_ID] Keywords that apply to all widgets: Keywords that apply to WIDGET_BASE: [, BASE_SET_TITLE=string] [, /CONTEXT_EVENTS] [, /ICONIFY] [, /KBRD_FOCUS_EVENTS] [, TAB_MODE=value] [, /TLB_ICONIFY_EVENTS] [, /TLB_KILL_REQUEST_EVENTS] [, /TLB_MOVE_EVENTS] [, /TLB_SIZE_EVENTS] Keywords that apply to WIDGET_BUTTON: Keywords that apply to WIDGET_COMBOBOX: [, COMBOBOX_ADDITEM=string] [, COMBOBOX_DELETEITEM=integer] [, COMBOBOX_INDEX=integer] [, /DYNAMIC_RESIZE] [, GET_VALUE=value] [, IGNORE_ACCELERATORS={string array | {0 | 1}}] [, SET_COMBOBOX_SELECT=integer] [/SET_LIST_EVENTS][, SET_VALUE=value] [, TAB_MODE=value] Keywords that apply to WIDGET_DRAW and WIDGET_WINDOW: Keywords that apply to WIDGET_DROPLIST: [, /DYNAMIC_RESIZE] [, GET_VALUE=variable] [, SET_DROPLIST_SELECT=integer] [, SET_VALUE=value] [, TAB_MODE=value] Keywords that apply to WIDGET_LABEL: [, /DYNAMIC_RESIZE] [, GET_VALUE=value] [, SET_VALUE=value] Keywords that apply to WIDGET_LIST: [, /CONTEXT_EVENTS] [, SET_LIST_SELECT=value] [, SET_LIST_TOP=integer] [, SET_VALUE=value] [, TAB_MODE=value] Keywords that apply to WIDGET_PROPERTYSHEET: [, /CONTEXT_EVENTS] [, /EDITABLE] [, GET_VALUE=variable] [, /HIDE_ADVANCED_ONLY] [, IGNORE_ACCELERATORS={string array | {0 | 1}}] [, /MULTIPLE_PROPERTIES] [, PROPERTYSHEET_SETSELECTED=empty string, string, or array of strings] [, REFRESH_PROPERTY=string, array of strings, or integer] [, SET_VALUE=value] Keywords that apply to WIDGET_SLIDER: [, GET_VALUE=value] [, SET_SLIDER_MAX=value] [, SET_SLIDER_MIN=value] [, SET_VALUE=value][, TAB_MODE=value] Keywords that apply to WIDGET_TAB: [, SET_TAB_CURRENT=index] [, SET_TAB_MULTILINE=value] [, TAB_MODE=value] Keywords that apply to WIDGET_TABLE: Keywords that apply to WIDGET_TEXT: [, /ALL_TEXT_EVENTS] [, /APPEND] [, /CONTEXT_EVENTS] [, /EDITABLE] [, GET_VALUE=variable] [, IGNORE_ACCELERATORS={string array | {0 | 1}}] [, /INPUT_FOCUS] [, /KBRD_FOCUS_EVENTS] [, /NO_NEWLINE] [, SET_TEXT_SELECT=[integer, integer]] [, SET_TEXT_TOP_LINE=line_number] [, SET_VALUE=value] [, TAB_MODE=value] [, /USE_TEXT_SELECT] Keywords that apply to WIDGET_TREE: [, /CONTEXT_EVENTS] [, GET_VALUE=variable] [, SET_DRAG_NOTIFY=string] [, /SET_DRAGGABLE] [, /SET_DROP_EVENTS] [, /SET_MASK] [, SET_TREE_BITMAP=array] [, SET_TREE_CHECKED=value] [, /SET_TREE_EXPANDED] [, SET_TREE_INDEX=value] [, SET_TREE_SELECT={0 | 1 | widget ID | array of widget IDs}] [, /SET_TREE_VISIBLE] [, SET_VALUE=value] [, TAB_MODE=value] [, TOOLTIP =string] ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ REALIZE:【全部】界面例示。 |
|||
05 | WIDGET_INFO |
====<<<< Description >>>>==== 可获得已经存在组件的信息。 ====<<<< Syntax >>>>==== Result = WIDGET_INFO( [Widget_ID] ) Keywords that apply to all widgets: Keywords that apply to WIDGET_BASE: [, /CONTEXT_EVENTS] [, /MODAL] [, /TLB_ICONIFY_EVENTS] [, /TLB_KILL_REQUEST_EVENTS] [, /TLB_MOVE_EVENTS] [, /TLB_SIZE_EVENTS] Keywords that apply to WIDGET_BUTTON: [, /BUTTON_SET] [, /DYNAMIC_RESIZE] [, /MASK] [, /PUSHBUTTON_EVENTS] [, /TOOLTIP] Keywords that apply to WIDGET_COMBOBOX: [, /COMBOBOX_GETTEXT] [, /COMBOBOX_NUMBER] [, /DYNAMIC_RESIZE] [, /LIST_EVENTS] Keywords that apply to WIDGET_DRAW and WIDGET_WINDOW: Keywords that apply to WIDGET_DROPLIST: [, /DROPLIST_NUMBER] [, /DROPLIST_SELECT] [, /DYNAMIC_RESIZE] Keywords that apply to WIDGET_LABEL: [, /DYNAMIC_RESIZE] Keywords that apply to WIDGET_LIST: [, /CONTEXT_EVENTS] [, /LIST_MULTIPLE] [, /LIST_NUMBER] [, /LIST_NUM_VISIBLE] [, /LIST_SELECT] [, /LIST_TOP] Keywords that apply to WIDGET_PROPERTYSHEET: [, /CONTEXT_EVENTS] [, COMPONENT=objref] [, /MULTIPLE_PROPERTIES] [, PROPERTY_VALID=string] [, PROPERTY_VALUE=string] [, /PROPERTYSHEET_NSELECTED] [, /PROPERTYSHEET_SELECTED] Keywords that apply to WIDGET_SLIDER: [, /SLIDER_MIN_MAX] Keywords that apply to WIDGET_TAB: Keywords that apply to WIDGET_TABLE: [, /COLUMN_WIDTHS] [, /CONTEXT_EVENTS] [, /ROW_HEIGHTS] [, /TABLE_ALL_EVENTS] [, /TABLE_BACKGROUND_COLOR] [, /TABLE_DISJOINT_SELECTION] [, /TABLE_EDITABLE] [, /TABLE_EDIT_CELL] [, /TABLE_FONT] [. /TABLE_FOREGROUND_COLOR] [, /TABLE_SELECT] [, /TABLE_VIEW] [, /TEXT_SELECT] [, /USE_TABLE_SELECT] Keywords that apply to WIDGET_TEXT: [, /CONTEXT_EVENTS] [, /TEXT_ALL_EVENTS] [, /TEXT_EDITABLE] [, /TEXT_NUMBER] [, TEXT_OFFSET_TO_XY=integer] [, /TEXT_SELECT] [, /TEXT_TOP_LINE] [, TEXT_XY_TO_OFFSET=[column, line]] Keywords that apply to WIDGET_TREE: [, /CONTEXT_EVENTS] [, /DRAG_NOTIFY] [, /DRAGGABLE] [, /DROP_EVENTS] [, /MASK] [, /TOOLTIP] [, /TREE_BITMAP] [, /TREE_CHECKBOX] [, /TREE_CHECKED] [, /TREE_DRAG_SELECT] [, /TREE_EXPANDED] [, /TREE_FOLDER] [, /TREE_INDEX] [, /TREE_ROOT] [, /TREE_SELECT] ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为给定组件 ID 的指定信息。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>==== ◈ GEOMETRY:设置组件的位置偏移和大小信息。 |
|||
06 | WIDGET_BUTTON |
====<<<< Description >>>>==== 按钮。 ====<<<< Syntax >>>>==== Result = WIDGET_BUTTON( Parent [, ACCELERATOR=string] [, /ALIGN_CENTER | , /ALIGN_LEFT | , /ALIGN_RIGHT] [, /BITMAP] [, /CHECKED_MENU] [, /DYNAMIC_RESIZE] [, EVENT_FUNC=string] [, EVENT_PRO=string] [, /FLAT] [, FONT=string] [, FRAME=width] [, FUNC_GET_VALUE=string] [, GROUP_LEADER=widget_id] [, /HELP] [, IMAGE=byte array] [, KILL_NOTIFY=string] [, /MASK] [, /MENU] [, /NO_COPY] [, /NO_RELEASE] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, /PUSHBUTTON_EVENTS] [, SCR_XSIZE=width] [, SCR_YSIZE=height] [, /SENSITIVE] [, /SEPARATOR] [, TAB_MODE=value] [, TOOLTIP=string] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS={0 | 1 | 2}] [, UVALUE=value] [, VALUE=value] [, X_BITMAP_EXTRA=bits] [, XOFFSET=value] [, XSIZE=value] [, YOFFSET=value] [, YSIZE=value] ) X Windows Keywords: ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为新创建按钮的组件 ID。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>==== ◈ Parent:新建按钮组件的父组件 ID。 |
|||
07 | WIDGET_LABEL |
====<<<< Description >>>>==== 标签组件,用来创建字符串标签。 ====<<<< Syntax >>>>==== Result = WIDGET_LABEL( Parent [, /ALIGN_CENTER | , /ALIGN_LEFT | , /ALIGN_RIGHT] [, /DYNAMIC_RESIZE] [, FONT=string] [, FRAME=width] [, FUNC_GET_VALUE=string] [, GROUP_LEADER=widget_id] [, KILL_NOTIFY=string] [, /NO_COPY] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, RESOURCE_NAME=string] [, SCR_XSIZE=width] [, SCR_YSIZE=height] [, /SENSITIVE] [, /SUNKEN_FRAME] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS={0 | 1 | 2}] [, UVALUE=value] [, VALUE=value] [, XOFFSET=value] [, XSIZE=value] [, YOFFSET=value] [, YSIZE=value] ) ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为新创建标签的组件 ID。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ Parent:新建标签组件的父组件 ID。 |
|||
08 | WIDGET_LIST |
====<<<< Description >>>>==== 列表组件,用来创建列选择组件。 ====<<<< Syntax >>>>==== Result = WIDGET_LIST( Parent [, /CONTEXT_EVENTS] [, EVENT_FUNC=string] [, EVENT_PRO=string] [, FONT=string] [, FRAME=width] [, FUNC_GET_VALUE=string] [, GROUP_LEADER=widget_id] [, KILL_NOTIFY=string] [, /MULTIPLE] [, /NO_COPY] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, RESOURCE_NAME=string] [, SCR_XSIZE=width] [, SCR_YSIZE=height] [, /SENSITIVE] [, TAB_MODE=value] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS={0 | 1 | 2}] [, UVALUE=value] [, VALUE=value] [, XOFFSET=value] [, XSIZE=value] [, YOFFSET=value] [, YSIZE=value] ) ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为新创建列表的组件 ID。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ Parent:新建列表组件的父组件 ID。 |
|||
09 | WIDGET_DROPLIST |
====<<<< Description >>>>==== 下拉列表组件,与 WIDGET_LIST 组件类似,可以创建下拉列表。 ====<<<< Syntax >>>>==== Result = WIDGET_DROPLIST( Parent [, /DYNAMIC_RESIZE] [, EVENT_FUNC=string] [, EVENT_PRO=string] [, /FLAT] [, FONT=string] [, FRAME=value] [, FUNC_GET_VALUE=string] [, GROUP_LEADER=widget_id] [, KILL_NOTIFY=string] [, /NO_COPY] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, RESOURCE_NAME=string] [, SCR_XSIZE=width] [, SCR_YSIZE=height] [, /SENSITIVE] [, TAB_MODE=value] [, TITLE=string] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS={0 | 1 | 2}] [, UVALUE=value] [, VALUE=value] [, XOFFSET=value] [, XSIZE=value] [, YOFFSET=value] [, YSIZE=value] ) ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为新创建下拉列表的组件 ID。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ Parent:新建下拉列表组件的父组件 ID。 |
|||
10 | WIDGET_SLIDER |
====<<<< Description >>>>==== 滑动条组件,用来创建滑动条,滑动条可以交互获取或者设置指定范围内的整数值。 ====<<<< Syntax >>>>==== Result = WIDGET_SLIDER( Parent [, /DRAG] [, EVENT_FUNC=string] [, EVENT_PRO=string] [, FONT=string] [, FRAME=width] [, FUNC_GET_VALUE=string] [, GROUP_LEADER=widget_id] [, KILL_NOTIFY=string] [, MAXIMUM=value] [, MINIMUM=value] [, /NO_COPY] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, RESOURCE_NAME=string] [, SCR_XSIZE=width] [, SCR_YSIZE=height] [, SCROLL=units] [, /SENSITIVE] [, /SUPPRESS_VALUE] [, TAB_MODE=value] [, TITLE=string] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS={0 | 1 | 2}] [, UVALUE=value] [, VALUE=value] [, /VERTICAL] [, XOFFSET=value] [, XSIZE=value] [, YOFFSET=value] [, YSIZE=value] ) ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为新创建滑动条的组件 ID。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ Parent:新建滑动条组件的父组件 ID。 |
|||
11 | WIDGET_TREE |
====<<<< Description >>>>==== 树组件,用来创建属性列表组件。 ====<<<< Syntax >>>>==== Result = WIDGET_TREE( Parent [, /ALIGN_BOTTOM | , /ALIGN_CENTER | , /ALIGN_LEFT | , /ALIGN_RIGHT | , /ALIGN_TOP] [, BITMAP=array] [, /CHECKBOX] [, CHECKED=value] [, /CONTEXT_EVENTS] [, DRAG_NOTIFY=string] [, /DRAGGABLE] [, /DROP_EVENTS] [, EVENT_FUNC=string] [, EVENT_PRO=string] [, /EXPANDED] [, /FOLDER] [, FUNC_GET_VALUE=string] [, GROUP_LEADER=widget_id] [, INDEX=value] [, KILL_NOTIFY=string] [, /MASK] [, /MULTIPLE] [, /NO_BITMAPS] [, /NO_COPY] [, NOTIFY_REALIZE=string] [, PRO_SET_VALUE=string] [, SCR_XSIZE=width] [, SCR_YSIZE=height] [, /SENSITIVE] [, TAB_MODE=value] [, TOOLTIP=string] [, /TRACKING_EVENTS] [, UNAME=string] [, UNITS={0 | 1 | 2}] [, UVALUE=value] [, VALUE=string] [, XOFFSET=value] [, XSIZE=value] [, YOFFSET=value] [, YSIZE=value] ) ---------------------------------------------------------------------------------- ====<<<< Return Value >>>>==== 返回值为新创建树形列表的组件 ID。 ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ Parent:新建属性列表组件的父组件 ID。 |
|||
XMANAGER |
====<<<< Description >>>>==== 组件创建成功后,用 XMANAGER 来处理产生的事件并调用事件响应程序。 ====<<<< Syntax >>>>==== XMANAGER [, Name, ID] [, /CATCH] [, CLEANUP=string] [, EVENT_HANDLER=‘procedure_name’] [, GROUP_LEADER=widget_id] [, /JUST_REG] [, /NO_BLOCK] ---------------------------------------------------------------------------------- ====<<<< Parameters >>>>====
◈ Name:字符串,用主文件名。 |
||||
PROGRAM_EVENT |
====<<<< Description >>>>==== 事件响应程序是一个 pro 程序,启动事件响应后,一旦有事件处理操作,系统会自动调用该事件程序并传递组件事件结构体。 ====<<<< Syntax >>>>==== PRO PROGRAM_EVENT , var ====<<<< Parameters >>>>====
◈ PROGRAM:指定的程序名称。 |
posted on 2016-08-25 16:25 McDelfino 阅读(1323) 评论(0) 编辑 收藏 举报