×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    153

    how to fit image on button if image size is large than button

    hello,I am working on S40 using sdk2.0 and S40_with_theme.now my requirment is that i set an image on button haviing size large than the default button .so which method i have to use by which we can set the image proper on button .i sending snapshot please look it give me solution of my problem.
    http://imgur.com/WbknKYq
    Last edited by vikranttanwar@; 2013-08-13 at 08:26. Reason: continued in other thread

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: how to fit image on button if image size is large than button

    your image is not giving much clue, but why dont you resize your image to fit your button , or the other way around !!

  3. #3
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,140

    Re: how to fit image on button if image size is large than button

    my merging did not really work too well. Was trying to merge the other thread with same title to here, and the part

    i got the solution of my problem
    thanks


    is from the other thread, so supposing he got his solution somehow.

  4. #4
    Registered User
    Join Date
    May 2013
    Posts
    153

    Re: how to fit image on button if image size is large than button

    how we can resize an image to fit the button is there any mehtods

  5. #5
    Registered User
    Join Date
    Dec 2012
    Location
    India
    Posts
    264

    Re: how to fit image on button if image size is large than button

    In LWUIT, use imageObject.scaled(newWidth,newHeight).This will return a new Image object which is scaled to the required size.

    Alternatively,since this image is static, you can also try resizing the image using Photoshop or any other Image Editor.

  6. #6
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: how to fit image on button if image size is large than button

    Quote Originally Posted by arunkam View Post
    In LWUIT, use imageObject.scaled(newWidth,newHeight).This will return a new Image object which is scaled to the required size.

    Alternatively,since this image is static, you can also try resizing the image using Photoshop or any other Image Editor.
    If the image is only being used for that purpose, that is definitely the best option (resizing the image outside of the app).
    -CarlosDL

Similar Threads

  1. How to change image on button on another button click
    By Manpreet_Singh in forum Mobile Java UI and User Experience
    Replies: 2
    Last Post: 2013-08-07, 13:05
  2. please help,how to add image on button
    By vikranttanwar@ in forum Mobile Java General
    Replies: 1
    Last Post: 2013-07-09, 11:12
  3. problem in display an image button on canvas(Background image)
    By mramin05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2008-11-12, 04:51
  4. image imn button
    By introuble in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-07-20, 18:49

Posting Permissions

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