×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    12

    Exclamation Problem of TextField key hooking...

    I have an application in J2ME where say 1 textfield and 2 command are added. By default when focus is in textfield then if i press FIRE button from mobile then it couldn't detect key hooking for that textfield. So i want this:

    after writing something on textfield when i press FIRE then it will show me the content of that textfield. I can't capture KeyPressed event for textfield.

    is there any one who can help me ???

  2. #2
    Regular Contributor
    Join Date
    Jun 2008
    Location
    Singapore
    Posts
    167

    Re: Problem of TextField key hooking...

    Hi,

    You use Form, there is no KeyPress() event. For Form components,
    use itemStateChanged() event.

    (Implements ItemStateListener)
    ---Knowledge sharing is power---

    Hans

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    2

    Re: Problem of TextField key hooking...

    command in java me are assigned to soft keys not to the fire button, so you can do what you want not by pressing fire button but one of the soft keys.
    Classes extending Item doesn't have keyPressed methon if you want to do it the way you said you'll have to write yout own textfiled item for example by extending CustomItem class

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    2

    Re: Problem of TextField key hooking...

    Quote Originally Posted by tieutue View Post
    You use Form, there is no KeyPress() event. For Form components,
    use itemStateChanged() event.
    To my knowledge and tests presing fire button while in textfiled does not generate state change event, as it is stated in documentation that this event is generated when "user enters or modifies the value in a TextField", and pressing fire does not enter any text.

Similar Threads

  1. List of Codes for Buttons
    By skela in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-05-20, 20:39
  2. Replies: 2
    Last Post: 2007-12-21, 17:07
  3. TextField maxSize problem
    By pillar in forum Mobile Java General
    Replies: 0
    Last Post: 2006-05-29, 12:06
  4. Simultaneous Key Press Problem in Series 60 MIDP Concept SDK Beta 0.3.1
    By tommylkc in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2004-02-05, 12:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×