Welcome!

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

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

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.

Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

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.