BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-12-2011, 04:32 AM   #1 (permalink)
New Member
 
Join Date: Feb 2011
Model: 8350i
PIN: N/A
Carrier: bouygues
Posts: 4
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default BasicEdicField Listener

Please Login to Remove!

Hey!

I'm new on blackberry development.

I'm currently trying to do an application, and here is what my Mainscreen looks like:

img715.imageshack.us/img715/271/forumkl.jpg

The first text field is a BasicEditField
The second one is a PasswordEditField

What I would like for the BasicEditField is that the user could not type anything else than 4 characters and then 4 numbers (like in the picture : "marc" and then "1000").

I also want my cursor to go to the password field if the enter key is pressed while being in the Code field.

I read things about changeListerners, keyListeners but I'm not quite sure about how what to do...

Help would be highly appreciated.
Thank you
Offline  
Old 02-17-2011, 12:06 AM   #2 (permalink)
New Member
 
Join Date: Feb 2011
Model: 8350i
PIN: N/A
Carrier: bouygues
Posts: 4
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: BasicEdicField Listener

Up?
Offline  
Old 02-17-2011, 03:37 AM   #3 (permalink)
New Member
 
Join Date: Feb 2011
Model: 8800
PIN: N/A
Carrier: Airtel
Posts: 2
Post Thanks: 0
Thanked 1 Time in 1 Post
Default Re: BasicEdicField Listener

You can use EditField for your username as below

usernameField = new EditField("User Name" , "" , 8 ,EditField.NO_NEWLINE);

this no_newline will allow you to go to password field when you press enter ,
you can also restrict the number of characters to 8 ,
Offline  
The Following User Says Thank You to chamu For This Useful Post:
Sushirond (02-17-2011)
Old 02-17-2011, 10:45 AM   #4 (permalink)
New Member
 
Join Date: Feb 2011
Model: 8350i
PIN: N/A
Carrier: bouygues
Posts: 4
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: BasicEdicField Listener

Thanks for that!

Quote:
Originally Posted by Sushirond View Post
What I would like for the BasicEditField is that the user could not type anything else than 4 characters and then 4 numbers (like in the picture : "marc" and then "1000").
Does anyone know how to do for that part?
Offline  
Old 02-17-2011, 02:20 PM   #5 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default Re: BasicEdicField Listener

You'll have to write you own class extending TextFilter.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: BasicEdicField Listener
Thread Thread Starter Forum Replies Last Post
TCP / IP Listener rwAJ Developer Forum 0 12-01-2010 08:16 AM
I/O Exception Thrown when using Message Listener JoelParker Developer Forum 3 02-10-2009 12:04 AM
Help with listener for ObjectChoiceField Fe_Cavallo Developer Forum 4 09-22-2008 10:45 AM
BackGround Listener Thread BB_007 Developer Forum 8 12-09-2005 10:01 AM
Mail API: Folder Listener doesnt work on handheld vibhor Developer Forum 4 09-29-2005 07:01 AM





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.