Listbox - Multiple Checkboxes, but NOT multiple Selections

  1. 6 weeks ago

    Dave S

    Jan 7 San Diego, California USA

    I have a listbox, where only ONE record can be "active" [selected] at a time..... BUT I need the ability to set (or reset) the checkboxes on multiple rows at once.

    Anyone have a way to do this that is intuitive to the user?

    Thanks.... I found an alternative approach to get the required data....

  2. Karen A

    Jan 7 Pre-Release Testers

    @Dave S I have a listbox, where only ONE record can be "active" [selected] at a time..... BUT I need the ability to set (or reset) the checkboxes on multiple rows at once.

    Anyone have a way to do this that is intuitive to the user?

    IIRC If you click directly on the checkbox the row is not selected... If not If you put it in it's own column you cam make that happen for a click anywhere in that column if you want Or in the first 20 pixels.

    - karen

  3. Dave S

    Jan 7 San Diego, California USA

    You misunderstand Karen... I want the user to be able to set/reset the checkbox on muliple rows without having to click each check box.

    I had thought I would check how many rows the user had selected and if more than ONE I would alter the checkboxes in those that were selected, and then unselect them... .However there is no way to tell when the user have finished selecting a range of rows. using MouseDown/Up is not an option, since UP won't fire unless DOWN returns TRUE and if DOWN returns TRUE nothing can be selected :(

  4. Karen A

    Jan 7 Pre-Release Testers

    @Dave S You misunderstand Karen... I want the user to be able to set/reset the checkbox on muliple rows without having to click each check box.

    I had thought I would check how many rows the user had selected and if more than ONE I would alter the checkboxes in those that were selected, and then unselect them... .However there is no way to tell when the user have finished selecting a range of rows. using MouseDown/Up is not an option, since UP won't fire unless DOWN returns TRUE and if DOWN returns TRUE nothing can be selected :(

    Timer checking if the shift or control key is still down?

    -Karen

  5. Craig H

    Jan 7 Black Hills, SD, USA
    Edited 6 weeks ago

    Dave, I not sure I understand... It seems as though this is a "radio button" problem "where only ONE record can be "active" [selected] at a time". ( I presume that having a checkbox checked is the same as being "active" and being selected )

    @Dave S I have a listbox, where only ONE record can be "active" [selected] at a time

    Did you mean that only one record can be "active" or that only one record should be "active"? In the former case, it is not clear how the user could get into the state of having multiple selections? Radio buttons would, of course, prevent the user from making multiple selections.

    I asked a question the other day in the Getting Started forum about CheckBoxes as a tri-state control. Maybe you could use the "indeterminate" state of checkboxes in some way? If your views can be formulated as a sort of "tree view", then the "indeterminate" state may be of use.

  6. Dave S

    Jan 7 San Diego, California USA

    I want no more than one record that is considered "selected", but I want/need to be able to select any range of rows and set their checkbox.

    Consider this. the "selected/active" record is the one available for the user to edit (its an Address), only one address can be in edit mode at any one time. The checkboxes determine what records are available for a "batch" process. This could be to delete the records, print the records or transfer them from one list to another.

    So its kind of like inverting what a listbox considers "checking the box" vs selecting a range

  7. Julian S

    Jan 7 Pre-Release Testers, Xojo Pro UK
    Edited 6 weeks ago

    Do it like windows explorer does, if you select the row (not on the checkbox) it selects the row, if you select on the checkbox it checks the box and selects the row which you can repeatedly do until you click on just a row (not on a checkbox) which clears all checks and selects the current row.

    If you want to try this, turn on "item check boxes" in explorer under the view tab.

  8. Dave S

    Jan 7 San Diego, California USA

    Thanks.... but again.. I don't want the user to have to click on EACH row. You can select groups or random rows using Shift/Alt.

    What I have decided to do is if the user SELECTS more than one row, the edit window goes away, and a menu of options appears....

    And Julian, no offsense, but I avoid WINDOWS as much as I can... using it on those rare (very) where I need to test an app,

  9. Julian S

    Jan 7 Pre-Release Testers, Xojo Pro UK

    Ah right I thought you wanted something different because multi selecting with key modifiers is standard (at least on Windows).

    Don't forget that multi select on lists acts differently between Mac/Windows if you're planning cross platform.

  10. Norman P

    Jan 7 Pre-Release Testers, Xojo Pro outside listening to the silen...
    Edited 6 weeks ago

    you can shift click IF you allow multiple selection in the listbox itself
    otherwise you can only select one row at a time

    you cant allow both at the same time
    unless MAYBE if when you detect mousedown you check if the shift key is down as well and alter the selection mode to multiple and then change it back sometime later
    thats the only way I can think of that a Xojo listbox would allow this behaviour

    *I've never coded one to do this but it seems sort of plausible you could

  11. Hey Dave
    How about putting a one column additional listbox with checkboxes in every row next to your main listbox (and scroll synced)? That way the user will have one row selected on the main listbox but many rows selected on the other.
    Then it's just a matter of checking the checboxes on the additional listbox to see what's selected.

  12. Dave S

    Jan 7 Answer San Diego, California USA

    Thanks.... I found an alternative approach to get the required data....

  13. Michel B

    Jan 8 Pre-Release Testers, Xojo Pro
    Edited 6 weeks ago

    @Dave S Thanks.... I found an alternative approach to get the required data....

    After that thread, it could be nice for posters and readers to explain how you solved the issue.

  14. Dave S

    Jan 8 San Diego, California USA

    by alternative

    @Michel B After that thread, it could be nice for posters and readers to explain how you solved the issue.

    see 6 postings above

  15. Michel B

    Jan 8 Pre-Release Testers, Xojo Pro
    Edited 6 weeks ago

    I see. You ask for assistance. Why refuse to explain what solution you applied ?

  16. Dave S

    Jan 8 San Diego, California USA

    I am not refusing to explain.... but the solution I decided upon has nothing to do with the original question I asked. It is an alternative work-around, not a method to do the actions in the original question.

    @Dave S What I have decided to do is if the user SELECTS more than one row, the edit window goes away, and a menu of options appears....

  17. Douglas H

    Jan 8 Pre-Release Testers, Xojo Pro
    Edited 6 weeks ago

    @Michel B I see. You ask for assistance. Why refuse to explain what solution you applied ?

    Moreover, he DID say what he ended up doing. But when you asked he said "see 6 postings above" but did not also repeat:

    What I have decided to do is if the user SELECTS more than one row, the edit window goes away, and a menu of options appears....

    EDIT: I see Dave has now ammended his answer to repeat that as well.

or Sign Up to reply!