Bug #9680
Key modifiers not ignored when setting COMBO-BOX value from dropdown list
0%
History
#1 Updated by Șerban Bursuc over 1 year ago
Small leftover observed from #9259:
1. Take the following testcase:
define variable cb-docsys as character format "X(256)":U
label "Documentsystem":T
view-as combo-box sort inner-lines 15
list-item-pairs
"Item1":U,"Item2":U,
"A","a",
"B","b",
"C","c",
"D","d",
"A","a",
"B","b",
"C","c",
"D","d",
"A","a",
"B","b",
"C","c",
"D","d",
"A","a",
"B","b",
"C","c",
"D","d",
"A","a",
"B","b",
"C","c",
"D","d",
"A","a",
"B","b",
"C","c",
"D","d"
drop-down-list
size 52 by 1.1
bgcolor 15 fgcolor 19 no-undo.
define frame fr.
enable cb-docsys with frame fr.
cb-docsys:screen-value = "Item2".
on value-changed of cb-docsys do:
message now "val changed".
end.
wait-for close of current-window.
2. Open the dropdown list
Normally, when pressing a key (for example "a") the COMBO-BOX value switches to that of a matching element in a list (pressing "a" in the testcase changes the COMBO-BOX value to "A").
However, when using key modifiers like CTRL, in FWD the value does not change. In OE the modifier key is ignored. Pressing "CTRL-A" is the same as pressing "a".
The place that needs to be modified is in ScrollableList.processKeyEvent:
if (box != null)
{
int newIndx = getFirstCharSelection(kvt, model(), currentRow());
// We found the new item to highlight and it is not the same as
// the current one
if (newIndx >= 0)
newIdx should not be -1 with the CTRL-A keystroke for example.
#3 Updated by Șerban Bursuc over 1 year ago
- Subject changed from Key modifiers not ignored when setting COMBO-BOX value from dropdown list to Key modifiers not ignored when setting COMBO-BOX value from selection list
#4 Updated by Vladimir Tsichevski over 1 year ago
- Subject changed from Key modifiers not ignored when setting COMBO-BOX value from selection list to Key modifiers not ignored when setting COMBO-BOX value from dropdown list
Șerban Bursuc wrote:
However, when using key modifiers like
CTRL, in FWD the value does not change.
Correction: This applies only to the Ctrl modifier. Based on my observation, other modifiers are ignored in OE.