Wish Checkbox click event

Discussion in 'Bugs & wishlist' started by aggelos, May 8, 2015.

  1. aggelos

    aggelos Member Licensed User

    I think checkbox should implement click event besides CheckedChange.
    There are a lot of times that you want to distinguish between the user pressing the checkbox and changing it via code.
    For example, i use a checkbox to mark/unmark a photo. when i show the photo
    1) i read from sqlite if the photo is marked
    2) change the checkbox to show the mark status
    3) checkedchange fires and executes the code to mark/unmark the photo in sqlite

    i know there are various ways to deal with this like implementing the onclick via reflection,
    using a flag to dinstinguish between loading state, but i think onlick is the right way, and it should be supported out of the box.
  2. Erel

    Erel Administrator Staff Member Licensed User

    All events inherit the Click event from the View object. It is not listed for Checkbox however you can manually add it.
  3. aggelos

    aggelos Member Licensed User

    it is not listed in checkbox documentation nor does it appear when tou type "sub <TAB>"

    i will add it, thank you