Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 6
Registered: ‎11-12-2008
My Device: Not Specified

Custom EditField

Hello all, I was wondering whether anyone had any idea how to embed an Edit field in a Graphic, OR, add a border around said Edit Field. I'm trying to achieve a look similar to the sign-in screen on MSN Messanger for Blackberry (just as a reference).

Thank you for your help/time.

 

Developer
Posts: 445
Registered: ‎10-14-2008
My Device: Blackberry Bold 9000
My Carrier: SingTel

Re: Custom EditField

[ Edited ]
Message Edited by zahidalinaqvi on 11-18-2008 06:41 PM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks & Regards
Zahid Naqvi | Senior Software Engineer
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Custom EditField

Thanks for posting this code zahidalinaqvi, I was interested to try it.

 

However it doesn't seem to work very well, and once I've scrolled into it, I can't get out.  There are also a number of unusual things about it, for example:

 

1) public static EditField editField;

why is this public?

why is this static?

 

2) You seem to add a VerticalFieldManager, to a VerticalFieldManager, which seems unnecessary.

 

Can you tell us what you expect this Field to do and how we should use it?

 

Regarding the original post, I would start by doing something like the above, by painting the background image using the FieldManager paint method, adding the EditField to the FieldManager and postitioning the Field.

 

You can find out how to do all this by looking at threads on here and in the Developer KB.  You might find the following useful:

How to - Create a custom layout manager for a screen
Article Number: DB-00117

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/... 

 

How To - Create custom fields
Article Number: DB-00120

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/...

 

 

Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Custom EditField

package com.org
you can stop reading the code here Smiley Wink
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 445
Registered: ‎10-14-2008
My Device: Blackberry Bold 9000
My Carrier: SingTel

Re: Custom EditField

This is the running code and i simply copy and paste for you guys.

that why there is some unnessery things.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks & Regards
Zahid Naqvi | Senior Software Engineer
Developer
Posts: 445
Registered: ‎10-14-2008
My Device: Blackberry Bold 9000
My Carrier: SingTel

Re: Custom EditField

simply create object of this class and add on your screen.

it is something like framework of editfield thats why i created constructors.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks & Regards
Zahid Naqvi | Senior Software Engineer
New Developer
Posts: 6
Registered: ‎11-12-2008
My Device: Not Specified

Re: Custom EditField

Thank you all for your help, I am quite eager to try this and will be sure to let you know how it turns out along with the final code.

Again thank you for taking the time!

 

Highlighted
Developer
Posts: 445
Registered: ‎10-14-2008
My Device: Blackberry Bold 9000
My Carrier: SingTel

Re: Custom EditField

i want to create my own framework so i can develop my bberry apps easily and fast.

 

if you have some custom component which can help me out then please mail me on zahidalinaqvi@gmail.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks & Regards
Zahid Naqvi | Senior Software Engineer