• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Overlaying a Canvas over another Canvas

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to stack another Canvas over an existing displayed Canvas.
The new Canvas on top is to be considered like a dialog box.

However, it seems like the Canvas always takes over the whole screen.
I want my dialog Canvas to take up only 1/2 of the height of the bottom Canvas. Is this achievable ? Note that in my top Canvas, I've specified:


Thanks.
 
Syam Sathyan George
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I seriously doubt whether this is really possible in CLDC.
Because only a single displayable entity can be set to the current display at a time!!!.

Maybe some implementations like the SAVAGE might do this for you!!!
Try the cdc phones(they claim to have awt in them)!!!
 
Rashid Mayes
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. Can you elaborate? Are you using low level graphics? The canvas will only paint graphics where instructed to do so. In the example of a popup dialog, the class (doesn't need to extend canvas) would paint the dialog box subsequent the painting of the main window.

In short it is achievable. The graphics class also includes methods for clipping and translating; although I do not think that they are needed for what you want to accomplish.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic