• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Overlaying a Canvas over another Canvas

 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)!!!
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Grow a forest with seedballs and this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic