If a CT_TREE control (12) has it's 'multiselectEnabled' parameter set to 1, tvSetCursel would be expected to handle multiple selections, but only one entry can be selected at a time.
Description
Description
Details
Details
- Severity
- Tweak
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Scripting
Steps To Reproduce
Execute via Debug Console:
[] 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],"Child_B"]; _CT_TREE tvAdd [[0],"Child_C"]; _CT_TREE tvExpand [0]; sleep 1; for "_i" from 0 to 2 do { hint format ["Selecting Child %1",_i]; _CT_TREE tvSetCurSel [0,_i]; sleep 1; }; sleep 1; hint "DESELECT ALL"; _CT_TREE tvSetCurSel [-1]; };
Event Timeline
Comment Actions
[] spawn { disableSerialization; _CT_TREE = findDisplay 46 ctrlCreate ["RscTreeMulti", -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],"Child_B"]; _CT_TREE tvAdd [[0],"Child_C"]; _CT_TREE tvExpand [0]; sleep 1; for "_i" from 0 to 2 do { hint format ["Selecting Child %1",_i]; _CT_TREE tvSetSelected [[0, _i],true]; sleep 1; }; sleep 1; hint "DESELECT ALL"; _CT_TREE tvSetCurSel [-1]; };