Fandom

武装突袭 Wiki

TvSetCurSel

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduced with Arma 3 version 0.74
  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
0.74

描述

描述:
Sets cursor to given item on given path. IDC means id of parent Tree View. To deselect all items use [-1] for the path param (available since Arma 3 v1.55.133898)

基本句法

句法:
tvSetCurSel [idc, path]
参数:
[idc, path]: Array

idc: Number

path: Array - Array containing numbers.
返回值:
Nothing

替代句法

句法:
control tvSetCurSel path
参数:
control: Control

path: Array of Number
返回值:
Nothing

范例

范例1:
tvSetCurSel [101, [0]];

范例2:
_ctrl tvSetCurSel [0,0,0];

范例3:
[] spawn { disableSerialization; _CT_TREE = findDisplay 46 ctrlCreate ["RscTree", -1]; _CT_TREE ctrlSetPosition [0,0,0.3,1]; _CT_TREE ctrlCommit 0; _CT_TREE tvAdd [[],"Parent_A"]; _CT_TREE tvAdd [[0],"Child_A"]; _CT_TREE tvAdd [[0,0],"Grandchild_A"]; _CT_TREE tvAdd [[],"Parent_B"]; _CT_TREE tvAdd [[1],"Child_B"]; sleep 1; hint "SELECT [0,0,0]"; _CT_TREE tvSetCurSel [0,0,0]; sleep 2; hint "DESELECT ALL"; _CT_TREE tvSetCurSel [-1]; };

额外资讯

多人游戏:
-
也可以看看:

tvAddtvCleartvCollapsetvCounttvCurSeltvDatatvDeletetvExpandtvPicturetvSetDatatvSetPicturetvSetValuetvSorttvSortByValuetvTexttvValue

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Posted on Sep 11 2014
ffur2007slx2_5
(A3 1.28)tv command family overview //tv command family available for CT_TREE (type 12) private ["_count","_current","_data","_text","_value","_pic"]; _CT_TREE tvAdd [[],"Parent_A"]; _CT_TREE tvAdd [[0],"Child_A"]; _CT_TREE tvAdd [[0,0],"Grandchild_A"]; _CT_TREE tvAdd [[],"Parent_B"]; _CT_TREE tvAdd [[1],"Child_B"]; File:WuChaoRen CTTree001.png _count = _CT_TREE tvCount []; //return 2 _CT_TREE tvSetCurSel [0,0,0]; //select grandchild_A File:WuChaoRen CTTree003.png _current = tvCurSel _CT_TREE; //return [0,0,0] _CT_TREE tvSetData [_current,"I'm grandchild_A"]; _data = _CT_TREE tvData _current; // "I'm grandchild_A" _text = _CT_TREE tvText _current; //"Grandchild_A" _CT_TREE tvSetValue [_current,14]; _value = _CT_TREE tvValue _current; // 14 _CT_TREE tvSetPicture [_current,getText (configFile >> "CfgWeapons" >> "optic_NVS" >> "picture")]; _pic = _CT_TREE tvPicture _current; File:WuChaoRen CTTree004.png _CT_TREE tvExpand [1]; File:WuChaoRen CTTree005.png _CT_TREE tvSort [[],false ]; _CT_TREE tvSortByValue [[],false ]; File:WuChaoRen CTTree006.png _CT_TREE tvDelete [0,0]; //remove child_b tvClear 12; _CT_TREE tvCollapse []; File:WuChaoRen CTTree002.png

Bottom Section

更多维基

随机维基