3、初始化时做一下SetCtrlAttribute用ATTR_CTRL_TAB_POSITION属性设置控件,可以定义按TAB键时光标移动顺序。
2、CVI对键盘事件的响应是在面板的回调函数中case EVENT_KEYPRESS:下,该函数的参数eventData1即为键值的组合,vk=eventData1&VAL_VKEY_MASK即举雹拍可得到方向键等虚拟键的键值,具体可参考CVI帮助文档索引EVENT_KEYPRESS
水平有限,先说到这吧。
跟着上面那个兄弟的回配旁答,培首橡如果你的CVI的ActiveX中没有Microsoft Data and Time picker control6.0(SP4)怎么办?
首先下载芹侍一个组件MSCOMCT2.OCX,
64位系统 将组件放到C:\Windows\SysWOW64下面进行注册
32位系统放到C:\Windows\System32 下面进行注册
注册最好用命令提示符注册(管理员身份运行cmd,很重要!!!)
regsvr32 C:\Windows\SysWOW64\MSCOMCT2.OCX
会提示注册成功
再加载到项目中,效果如图所示
1、拦镇在用Tab键移动光标时,是按照 CVI自动根据.uir文件生成的那个.h文件中定义的控件ID移动的,打开那个.h文件你会看到#define PANEL 1 #define PANEL_…… n(n是整数,为控件ID),光标就是在可被光标选中的控件间按照这个ID顺序循环移动或衡桐的。int InsertTableRows (int panelHandle, int controlID, int
rowIndex, int numberOfRows, int cellType)
Purpose
Inserts new rows into a table control at the specified one-based
index.
The indexes of existing rows at and beyond the specified index are
increased by the number of rows inserted.
This function creates a new cell for each column in the table.
Parameters
Input
Name
Type
Description
panelHandle
int
Specifier for a particular panel that is currently in memory. You obtain
this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID
int
The defined constant, located in the .uir
header file, that you assigned to the control in the User Interface Editor, or
the ID returned by NewCtrl or DuplicateCtrl.
rowIndex
int
The one-based index into the table where the function inserts the first new
row.
Pass –衫坦1 to insert the first new rows at
the end of the table.
numberOfRows
int
The number of new rows to insert.
cellType
int
The cell type of the cells that might be created as a result of creating the
new rows. The following table lists the possible cell types.Constant Name
Constant Value
VAL_CELL_NUMERIC
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)