Page MenuHomeFeedback Tracker

CT_COMBO can not be unselected with lbSetCurSel -1
Closed, ResolvedPublic

Description

Unlike the very similar CT_LIST(N)BOX, CT_COMBO controls can not be deselected with

_ctrl lbSetCurSel -1;

Instead it will select the first entry.

Details

Severity
None
Resolution
Won't Fix
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Execute in Eden:

[] spawn {
	_d = findDisplay 313 createDisplay "RscDisplayEmpty";
	_c = _d ctrlCreate ["RscCombo", -1];
	for "_i" from 0 to 50 do {
		_c lbAdd format["Entry %1", _i];
	};
	_c lbSetCurSel random 50;
	uiSleep 2;
	_c lbSetCurSel -1;
};

Event Timeline

7erra created this task.Nov 26 2020, 12:47 PM
dedmen claimed this task.Nov 26 2020, 1:23 PM
dedmen closed this task as Resolved.
dedmen set Ref Ticket to AIII-53618.
dedmen changed Resolution from Open to Won't Fix.

Combobox at all supporting not having a value selected is the bug. Combobox should always have something selected.
Would need fix in lbAdd but won't be done cuz back compat