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: 20
Registered: ‎02-26-2011
My Device: Not Specified
Accepted Solution

show Height and Width of the screen

Is it possible to show the height and width of the screen in a labelfield?
Posts: 94
Registered: ‎07-08-2011
My Device: Many

Re: show Height and Width of the screen



Then you have to asing the in value to the text.


That's it.



(well I'm still learning so.....)

Feel free to press the like button on the right side to thank the user that helped you.
Please mark posts as solved if you found a solution.



Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: show Height and Width of the screen

Yes, it is. To do that, ask yourself two questions:

1) Is it possible to show a string I want in a LabelField? (The answer is yes)

2) Is it possible to put the screen's height and width into a string? (The answer is yes)

3) Is it possible to find out the screen's height and width? (The answer is yes)


Now just try to find out how to do what these three questions ask. #1 is answered right there in the documentaion of LabelField class. #2 is hopefully trivial. For #3, take a look into Display class.

please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!