little help with combo/option menus?
Posted: Sun Nov 10, 2019 3:04 am
I've been beating my head against the wall trying to fix bug report 22451 https://quality.livecode.com/show_bug.cgi?id=22451 here for the last couple of days. I've got code that *mostly* works, or at least would work if I could tell which line of the control is currently highlighted. The code is in button.cpp, and in particular I'm looking at lines 693 -> ~760.
tl;dr - selecting lines in a combo or option control by mouse works, by keyboard doesn't. The code as currently written ensures that the selection by keyboard will be empty. I can easily fix that by putting *something* in there, as for example the previous selection. There is also code to get the currently selected line, but you can't select a line by using the keyboard. I've tried setting the menuhistoryprop in the switch statement but that didn't have an effect, and I've gotten pretty good at hanging my linux desktop with the wrong invocations.
The MCButton class doesn't have a way that I have found to get the currently highlighted line, only the currently selected line. And doesn't seem to have a way to select a given line.
Any ideas?
tl;dr - selecting lines in a combo or option control by mouse works, by keyboard doesn't. The code as currently written ensures that the selection by keyboard will be empty. I can easily fix that by putting *something* in there, as for example the previous selection. There is also code to get the currently selected line, but you can't select a line by using the keyboard. I've tried setting the menuhistoryprop in the switch statement but that didn't have an effect, and I've gotten pretty good at hanging my linux desktop with the wrong invocations.
The MCButton class doesn't have a way that I have found to get the currently highlighted line, only the currently selected line. And doesn't seem to have a way to select a given line.
Any ideas?