• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Canvas size?

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class Canvas has a method called getWidth and getHeight, do the width and height i get from these methods include the menu bar (usually 'back' on the left, 'next' on the right)? Or just the space above the menu bar?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the MIDP 2.0 specification,
getHeight() of Canvas gets the height in pixels of the displayable area of the Canvas. and getWidth of Canvas gets the width in pixels of the displayable area of the Canvas. If the menu bar is from the device-specifc space, it won't be included in those getHeight() and getWidth()...

But if those buttons are created by your application, they are included...
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!