[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

uicontrol listbox selection disappearing

From: Kire Pudsje
Subject: uicontrol listbox selection disappearing
Date: Fri, 30 Mar 2018 20:48:36 +0200

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]