Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Resizing math

I didn't read over the entire thread completely, judt kind of skimmed it, but I dont see the issue with the first post.


A fourth of 263 is about 65.66, this times three is about 198 which is 6 pixels off of 204. So the image is scaled to just above 3/4 of the original height.

Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-, Z10 (STL100-3)-, Z30 (STA100-5)-, Passport (SQW100-1)-, PlayBook (16GB)-
My Carrier: Verizon

Re: Resizing math

What he meant (or how I interpreted it) was that he wanted to get an image scaled to a button. He used getPreferredWidth/Height to scale the image to fit to the button. But when the button was placed into a manager/screen/whatever he was using it was resized and he basically needed to resize his image to fit in the new-ly sized button. I though he could do that with getWidth/Height and he said that it returned 0 so didn't really help.


That's the basic summery.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.