×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Serbia
    Posts
    12

    Detecting pressed controls (buttons)

    I think this is a common question about WRT and touch devices (like 5800XM I use) but I can't seam to find the answer.

    What I need is a possibility to get OnMouseDown and OnMouseUp JavaScript events. To be precise I need to detect if user is holding a certain control. For example, imagine a button that user can click and hold. I want to be able to execute some code while user is holding down the button and stop when he releases it.

    I thought combination of OnMouseDown and OnMouseUp would be the easiest way to accomplish this but I can't seam to get those events to work. I think it's because WRT is automatically overwriting OnMouseDown event to detect scrolling cos every time you click and hold WRT expects that you are starting to scroll (correct me if I'm wrong). My widget doesn't need scrolling so disabling it could, possibly solve my problem, but I don't know how to do that, if it's actually possible.

    So I don't strictly need to cache those two events, I need to detect when users press and hold the button in my widget and any solution would be great.

    Thanks in advance.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Detecting pressed controls (buttons)

    Hi aiveldesign,

    afaik, WRT runtime currently fires touch-based events when the user ends a touch, so it is not actually possible to implement the behavior you're describing. Some time ago I've tried to find some workarounds, but without success: will let you know if something changes in my tests

    Pit

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    Serbia
    Posts
    12

    Re: Detecting pressed controls (buttons)

    Thank you jappit, I appreciate your reply. I needed any kind of answer to know if it's even possible.

    I tried some workarounds myself but haven't got any luck so far. I'm going to move on with my project but if you find out or get some workarounds please post or PM me. Thanks.

  4. #4
    Registered User
    Join Date
    Aug 2010
    Posts
    1

    Re: Detecting pressed controls (buttons)

    Hi,
    I'm looking about the same thing.
    I have tried to use onmouseover in place of onmousedown but it does not product good result.

Similar Threads

  1. Keep button pressed (like toggle buttons)
    By pixsta in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-02-16, 06:28
  2. Dialog buttons not displayed
    By juannoguera in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-11-16, 07:46
  3. Non-dismissing CBA buttons in CAknProgressDialog
    By storsjo in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-09-17, 09:16
  4. How to disable Toolbar 3 buttons in landscape mode
    By pncbose in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-06-17, 14:52
  5. Custom controls or extend existing controls?
    By mayur_24 in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-10-05, 16:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •