Deselect a listbox

Home Forums General Programming Deselect a listbox

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #117569
    jmarco
    Participant
    • Topics: 9
    • Replies: 22
    • Total: 31

    How can I deselect a listbox?

    Or how can I deselect a box when selecting another?

    Thanks a lot in advance.

    This Ctrlr rocks!

    #117570
    Tedjuh
    Participant
    • Topics: 4
    • Replies: 28
    • Total: 32

    https://docs.juce.com/master/classListBox.html#a60b4c8ea8a51c04d43899fd51f349794

    Look at deselectallrows. Not sure whether you have to use a mouselistener or modulator change.

    #117576
    jmarco
    Participant
    • Topics: 9
    • Replies: 22
    • Total: 31

    Hello, again.

    How can I use it? Can you give me an sintaxe example?

    Thanks in advance.

    #117589
    Tedjuh
    Participant
    • Topics: 4
    • Replies: 28
    • Total: 32

    panel:getListBox(“YourListBoxName”):deselectAllRows()

    Notice that it doesn’t change the modulatorValue of the deselected Listbox. It just looks like nothing is selected in the deselected listbox. You could add a “Deselected” Item at Item 0, and select it with panel:getListBox(“YourListBoxName”):selectRow(0,false,true). In that case you shouldn’t need deselectAllRows.

    Something like this:

    Deselected (modulatorValue 0)
    Item 1 (modulatorValue 1)
    Item 2 (modulatorValue 2)
    Item 3 (modulatorValue 3)

    #117607
    jmarco
    Participant
    • Topics: 9
    • Replies: 22
    • Total: 31

    Yes that worked! Thanks!

    How can I reset all boxes, mods, etc to initial state in panel load.
    Because when I load it some boxes are selected and I must select another value to start the method you teach me.

    Thanks.

    João Marco

    #117857
    higgy
    Participant
    • Topics: 9
    • Replies: 11
    • Total: 20

    — wrong thread —

    • This reply was modified 1 month, 2 weeks ago by higgy.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 26 guests online
No users are currently active
Forum Statistics
Threads: 2,372, Posts: 16,563, Members: 57,970
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!