• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

TextField with comma

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a little problem with TextField.
I would use a TextField that allow to insert only numbers and comma symbol (or dot symbol).
Ther's some class that allow these operations?
Plese, reply me soon!!!
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey, if you have the J2ME wireless tollkit installed, the MIDP API can be found under <j2mewtk root>\docs\api\index.html look up the index for t, textfield has a number of constraints that can be applied to texfields. the only ones that are suitable for you are probably email or numeric constraints. is it possible you could add in the comma or dot later?
dave
 
Cosimo Muro
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply. I need that people inserts Euro value into a TextField. (i.e. 34,50)
If I use a Numeric Costrain, the comma is impossible to be insert. So, how I can identify the right position of the comma (or dot)?
Otherwise, if I use an Email Constrain the User can insert every kind of character. This is not a problem for me, but I would like to give a user-friendly Interface.
So if I need to insert the number value 3, I need to be able to push just one time the button 3, and not more times.
Have you or some one, an answare to this problem?
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic