Disable checkboxes in listbox

  1. 5 months ago

    Beatrix W

    Feb 9 Testers, Third Party Store Europe (Germany)
    Edited 5 months ago

    In a window I'm showing users of a Valentina Server in a listbox. The boolean value of a user "IsUserAdmin" is shown as a checkbox in the listbox. But the checkbox column is editable which the value of "IsUserAdmin" is not. How do I prevent that the checkbox column is editable? Or is this not possible out of the box?

    Xojo 2019r3

    Assign a rowpicture which looks like a tickbox,
    or add code to the CellAction or some other event to set the checkbox back to the stae you know if should be.

  2. Jeff T

    Feb 9 Answer Midlands of England, Europe

    Assign a rowpicture which looks like a tickbox,
    or add code to the CellAction or some other event to set the checkbox back to the stae you know if should be.

  3. Beatrix W

    Feb 9 Testers, Third Party Store Europe (Germany)

    Thanks, setting the checkbox back in CellAction worked fine.

  4. Jean-Yves P

    Feb 9 Testers, Xojo Pro Europe (France, Besançon)

    or return true to the mousedown event of the listbox if the mouse.X is in the column of the checkbox.

  5. François V

    Feb 9 Testers, Xojo Pro Marchin (Huy), Belgium

    In the CellClick event :

      if me.ColumnType(column) = Listbox.TypeCheckbox then
        RETURN True
      end if

    or

      if column = myIsAdminColumn then
        RETURN True
      end if

or Sign Up to reply!