Page MenuHomeFeedback Tracker

tvSetCurSel can not select multiple entries of a CT_TREE
Feedback, NormalPublic

Description

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.

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

Sir_Mad_Cheese edited Steps To Reproduce. (Show Details)
BIS_fnc_KK added a subscriber: BIS_fnc_KK.EditedFeb 1 2022, 2:28 PM

use tvSetSelected and RscTreeMulti

BIS_fnc_KK changed the task status from New to Feedback.Feb 1 2022, 2:28 PM
[] 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]; 
};