• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generic Message Box

 
Swadesh Bera
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
is there is any way to design a geniric message box using cacnas class.
By which we can stop the execution and again start the execution according to type of message box return value. like java script confirm message....

Please hep me as soon as posible.

Regards
Swadesh
 
Yuri Magrisso
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand correctly, you certainly can.
If you are working in MIDP 2, I would advice you to base it on Form + CustomItem. What you need to do is to implement a component that can display multiple lines.
To display multi-line text on Canvas or on CustomItem, you'll need to implement a line breaking algorithm, break the string you want to show into lines and paint the lines with alignment of your choice.

I think it is better to do it as Form + CustomItem because you will be able to use the platform title and thus preserve the UI style throughout the application. If you implement it on Canvas, you will have to draw the title too and this can be quite different on the various handsets and not easy to draw.
In MIDP 1 devices you'll be forced to base it on Canvas, but those devices have usually more simple title styles.

You can use standard commands in both cases, so this is not a problem.

Hope this helps,
Yuri
 
Swadesh Bera
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply. But using custom item and form we need to command listener or statechange listener but we need to trap the fire event on selected button. There is any way to trap an image item and change the color of that image on navigate the left and right button. if we do this then we can use it...
Regards
Swadesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic