uicontrol listbox selection disappearing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

uicontrol listbox selection disappearing

Kire Pudsje
If I generate a listbox

h = figure(1);
lb = uicontrol('parent', h, 'style', 'listbox', 'string', {'one', 'two', 'three'}, 'position', [20,20,200,200]);

On creation the get(lb, 'value') returns 1 (as expected), despite no selection being visible.
If I select 'two', get(lb, 'value') returns 2 and the word shows it is selected by being colored blue.
If I click anywhere outside the listbox, get(lb, 'value') still returns 2, however no color indicating which item is selected.

In my application, I really need to have the current selection visible.
Im I missing a uicontrol option, to let the listbox keep showing it actual selected value? Or is this a bug?
Win10, octave 4.2.2, 64 bit. graphics_toolkit=qt

BTW, as a workaround, I currently placed a text label underneath to show the current selection.