jenney.qiu

导航

autoit里面的treeview选择某项的问题

#include <GuiTreeView.au3>
_GUICtrlTreeView_SelectItem($hWnd, $hItem [, $iFlag=0])

此方法是用来选择treeview的某项,最后一个缺省的参数可能被人忽略,其实很重要。

[optional] Action flag:
$TVGN_CARET - Sets the selection to the given item
$TVGN_DROPHILITE - Redraws the given item in the style used to indicate the target of a drag/drop operation
$TVGN_FIRSTVISIBLE - Scrolls the tree view vertically so that the given item is the first visible item

今天第三个参数就解决了我遇到的问题:某项下面有很多很多子项,要自动选择某个子项,然后单击这个子项的时候必须要用第三个参数,否则就无法单击到你的目标项了。

posted on 2013-03-01 18:59  jenney.qiu  阅读(1650)  评论(0编辑  收藏  举报