This discussion is archived
3 Replies Latest reply: Jan 11, 2011 11:31 PM by 799151 RSS

Text Edit

830224 Newbie
Currently Being Moderated
Sorry for my english (it not my native language). I have a problem. I want do masket(set custom mask, use mask constraint and show it in text eddit) text edit. How i understand i can't do it use standart components. And i can't find any gui framework, library or single component, using which i resolve my problem. I now that i can do custom realization based on canvas component. Maybe anybody tell me about framework or custom realization text edit with mask in MIDP?
  • 1. Re: Text Edit
    799151 Explorer
    Currently Being Moderated
    TextField component already has such functionality. Have a look at this. Pay attention to section "Input constraints"
  • 2. Re: Text Edit
    830224 Newbie
    Currently Being Moderated
    Thank's for reply, but i think you don't understand me. I want set mask on text field(f.ex. phone number) and i now that i can set input constraint - PHONENUMBER (3) on text edit, but i want change number of characters in phone (by default 10), change phone code length. F.ex I want set mask (9999) 99-99-999. I want see on my phone text input with mask (____) __-__-____ and if i try input char's in this text i can input only digits, in code area i can input 4 digits etc. If standart text edit control can resolve my problem, can you please send example for me?
  • 3. Re: Text Edit
    799151 Explorer
    Currently Being Moderated
    I understood well what exactly You need and I'm afraid that TextField standard compoment might not be enough to satisfy the requirements. Two possibilities: one is to try to write Your own component (maybe based on the canvas - but this is just supposition. And the second one is to use other framework - maybe Android would be useful here.

    Edit:

    Ok, two more solutions: use many TextFields instead of one and every single TextField will match the piece of the number, a the second one, check this out. Somebody has written that it compiles on CLDC device.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points