How to implement longClick em listview ?

Comments

  1. No offence, but I think you perhaps will get better answers if you are more detailed in your questions and add more context.  I have to admit I have problems understanding what you are asking.

    ReplyDelete
  2. Really sorry about this post, and I was leaving home and do not have time to write more.
    The problem is this, I have a listview that clicking performs an action, I would like when the user longclick one that I would call another Form with some additional information about the customer.
    and again sorry for my english via google translator.

    ReplyDelete
  3. longclick is drag?
    I only know click, double click and right click.

    ReplyDelete
  4. Ah! Now you are making sense!
    Unfortunately, I have no clue!

    ReplyDelete
  5. Hi Andre,  
    as i know where is no onLongClick event in XE5

    ReplyDelete
  6. (I'll describe how it works in VCL and you can use the same approach for other platforms). The right approach would be to create a descendant of TListView (or other listview class), then intercept button down and button up. When ButtonDown happens, you start the timer. If ButtonUp or MouseMove happens, you stop the timer. If the timer ticks, you stop it and fire you LongClick event.

    ReplyDelete
  7. André Faria If ListView in FMX, you can use GestureManager, which can determinate a lot of kind of gesture.

    ReplyDelete

Post a Comment