×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2010
    Location
    bangalore
    Posts
    21

    How to use image as button in Touch Nokia Mobile?

    Hi friends,
    I have created one canvas form. On canvas form i placed one register image as register button, now i am going to catch touch event on Register image. I have used pointerPressed method for catching touch event, but i dont know how to catch touch event when user touches a Register image button. Can any one give me idea how to catch touch event of that Register image button. Please help me friends.

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: How to use image as button in Touch Nokia Mobile?

    Quote Originally Posted by sajidshaikhi View Post
    Hi friends,
    I have created one canvas form. On canvas form i placed one register image as register button, now i am going to catch touch event on Register image. I have used pointerPressed method for catching touch event, but i dont know how to catch touch event when user touches a Register image button. Can any one give me idea how to catch touch event of that Register image button. Please help me friends.
    Try this
    Code:
    protected void pointerPressed(int x, int y) {  
          if (x > 10 && x < 60) 
             {  
                if (y > 240 && y < 270) {      
                         // Button pressed                           
                          } 
                 }
    }
    If you are using Series 40 6th Edition Feature Pack 1 devices, have a look at Gesture API http://www.developer.nokia.com/Commu...meAnimator_API

    Regards
    Gopal

  3. #3
    Registered User
    Join Date
    Nov 2010
    Location
    bangalore
    Posts
    21

    Thumbs up Re: How to use image as button in Touch Nokia Mobile?

    Hey Hi, Thanks for Response Balagopal...
    I found Solution
    protected void pointerPressed(int x, int y){
    if (y >= postn_image_y - (img_hgt/2 )
    && y<= postn_image_y + (img_hgt/2 )
    && x >= postn_image_x - (img_wdth / 2)
    && x <= postn_image_x + (img_wdth / 2)) {

    System.out.println("Register image clicked");

    }
    }

Similar Threads

  1. Replies: 5
    Last Post: 2012-03-09, 00:36
  2. Replies: 2
    Last Post: 2011-01-25, 09:19
  3. Replies: 3
    Last Post: 2010-03-31, 13:38
  4. How to use Nokia 6300 as Modem in Solaris 10
    By azimcuetcse01 in forum Wired and Wireless interfaces (Closed)
    Replies: 0
    Last Post: 2009-11-12, 07:35

Posting Permissions

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