开发者

Textbox on canvas in j2me

开发者 https://www.devze.com 2023-01-07 18:48 出处:网络
I am going to make application on j2me using canvas. I want to take textbox or textfield on my canv开发者_StackOverflow社区as.You can draw a basic textbox and display a string , and when it receives f

I am going to make application on j2me using canvas. I want to take textbox or textfield on my canv开发者_StackOverflow社区as.


You can draw a basic textbox and display a string , and when it receives focus, you can switch the view to that particular textbox ,something like this

textBox = new TextBox(....);
Midlet.display.setCurrent(textBox);

This would create your data entry more robust and save you from the pain of implementing various keyboard issues yourselves


These items are only available for adding to Forms. Canvas is a class for handling lower-level events.

You have to implement your own textbox, and that isn't easy.
Basic textbox would be a rectangle (drawRect) with text (drawString) inside of it.

0

精彩评论

暂无评论...
验证码 换一张
取 消