画布上的文本框
我想在画布上绘制文本框。因为我想在画布上制作注册表单。我不想使用表单。
谢谢
I want to draw text-box on canvas.As i want to make registration form on that canvas.i don't want to use form.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个难题;您可能希望将数字键映射到它们代表的字母或字符(请参阅这个问题)。这有两个问题:
无法在带有 QWERTY 键盘的设备上运行;您需要实施某种方法来检测这些
(更糟糕)没有预测文本。这对于密码输入来说很好,对于用户名输入来说可能也可以接受,但是对于出于任何其他目的输入任何长度的文本,如果你不能使用 T9,你真的会惹恼你的用户。< /p>
更好的解决方案是将文本绘制为画布上的文本框,但是当用户激活它时,从画布切换到全屏 文本框。这允许用户像往常一样在平台上输入文本,使您的生活更轻松(无需调试您自己的实现)。您甚至可以提示您要输入的内容,例如数字或电子邮件地址。
This is a hard problem; you'll probably want to map the number keys to the letters or characters they represent (see this question). This has two problems:
Won't work on devices with QWERTY keyboards; you'd need to implement some way of detecting these
(worse) No predictive text. This is fine for password input, and possibly just about acceptable for username input, but for entering any text of any length for any other purpose at all, you're really going to piss your users off if you can't use T9.
Better solution is to draw the text as a textbox on the canvas, but when the user activates it, switch from the canvas to a full-screen TextBox. This allows the user to enter text as usual on the platform, making your life easier (no implementation of your own to debug). You can even give it hints for what you want to enter, e.g. numbers or email addresses.
如果你想实现画布只是为了良好的 GUI 目的那么
你可以通过框架。
有很多可用于 j2me 开发的框架。我建议 LWUIT 最适合开发 UI 并使用 资源编辑器 用于设计 UI。如果您需要 LWUIT 最新源代码,请在此处查看并构建它。或者他们正式发布了LWUIT 1.4。 LWUIT 存储库甚至 LWUIT 1.4 包中提供了一些示例应用程序。
J2ME 中还提供其他框架
J2ME Polish
if you want to implement canvas just for good GUI purpose then
you can go through framework.
Lot of frameworks available for j2me developing. I suggest LWUIT is best for developing UI and use the Resource Editor for design the UI. If You need LWUIT latest source code checkout here and build it. or they officially released LWUIT 1.4. Some example application available in LWUIT repository and even LWUIT 1.4 package.
there are other frameworks also available in J2ME
J2ME Polish J4ME
尝试使用 scipt
Try using scipt