labwindowscvi2第三章图形用户界面设计39页
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
MessagePopup
输出信息对话框
int MessagePopup (char Title[], char Message[]);
MessagePopup ("提示信息", "测试结束,全部合格");
ConfirmPopup
等待确认对话框 Yes or No
int ConfirmPopup (char Title[], char Message[]);
19.05.2020
1/38
面板(panel)
19.05.2020
2/38
面板编辑窗口
19.05.2020
3/38
面板操作函数:
NewPanel
创建面板
int NewPanel (int Parent_Panel_Handle, char
Panel_Title[], int Panel_Top, int Panel_Left, int
释放面板
int DiscardPanel (int Panel_Handle)
DiscardPanel (testPanelHandle);
19.05.2020
4/38
HidePanel
隐藏面板
int HidePanel (int Panel_Handle);
HidePanel (testPanelHandle);
InstallPopup
载入弹出式面板
int InstallPopup (int Panel_Handle);
InstallPopup (testPanelHandle);
RemovePopup
删除弹出式面板
int RemovePopup (int Remove_Popuwenku.baidu.com);
RemovePopup (0);
i = FileSelectPopup ("c:\\vxipnp", "*.txt", "*.*", "选择数据文件", VAL_LOAD_BUTTON, 0, 0, 1, 0, filename);
DirSelectPopup
int DirSelectPopup (char Default_Directory[], char Title[], int Allow_Cancel?, int Allow_Make_Directory?, char Path_Name[]);
图形用户界面设计
1. 图形用户界面(Graphical User Interface)
面板(panel) 菜单条(menu bar) 控件(control) LabWindows/CVI自定义的资源格式
2. 面板设计
其它资源的容器 面板属性编辑器 使用用户界面设计函数创建面板和改变面板属性
SavePanelState
保存面板状态
RacallPanelState 调出面板状态
… …
19.05.2020
5/38
弹出式面板(Pop-up Panel)
19.05.2020
6/38
弹出式面板(Pop-up Panel)
19.05.2020
7/38
弹出式面板函数(Pop-up Panel)
PromptPopup ("输入信息", "请输入姓名", &name, 20);
19.05.2020
8/38
FileSelectPopup
int FileSelectPopup (char Default_Directory[], char Default_File_Spec[], char File_Type_List[], char Title[], int Button_Label, int Restrict_Directory?, int Restrict_Extension?, int Allow_Cancel?, int Allow_Make_Directory?, char Path_Name[]);
Panel_Height, int Panel_Width);
testPanelHandle = NewPanel (0, "新面板", 10, 10, 200,
300);
LoadPanel
载入面板
int LoadPanel (int Parent_Panel_Handle, char Filename[], int Panel_Resource_ID);
SetPanelAttribute 设置面板属性
int SetPanelAttribute (int Panel_Handle, int Panel_Attribute, ...);
SetPanelAttribute (testPanelHandle, ATTR_BACKCOLOR, VAL_RED);
GetPanelAttribute 获取面板属性
int GetPanelAttribute (int Panel_Handle, int Panel_Attribute, void *Attribute_Value);
GetPanelAttribute (testPanelHandle, ATTR_BACKCOLOR, &color);
i = DirSelectPopup ("c:\\vxipnp", "Select Directory", 1, 1, &pathname);
WaveformGraphPopup
int WaveformGraphPopup (char Title[], void *Y_Array, int Number_of_Points, int Y_Data_Type, double Y_Gain, double Y_Offset, double Initial_X, double X_Increment);
testPanelHandle = LoadPanel (0, "test.uir", PANEL_TEST);
DisplayPanel
显示面板
int DisplayPanel (int Panel_Handle);
DisplayPanel (testPanelHandle);
DiscardPanel
response = ConfirmPopup ("测试信息", "测量错误,是否继续?");
PromptPopup
等待输入字符信息对话框
int PromptPopup (char Title[], char Message[], char Response_Buffer[], int Max_Response_Length);