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
Developer
uttamtts
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel
Accepted Solution

Place EditField in Listfield

Hi all , I want to place Editfield inside a list field

like this

______________________________

Repeat                   here editfield           image

_______________________________

Snooze                 here editfield           image

_______________________________

 i want to make my listfield view look like above how can i do this ...

 

can any one help me

thanks

Please use plain text.
Developer
Dionysus
Posts: 152
Registered: ‎07-28-2011
My Device: Bold 9900
My Carrier: MTN

Re: Place EditField in Listfield

The best way would be to put the fields in a HorizontalFieldManager and add the manager to the list field.

Please use plain text.
Developer
uttamtts
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: Place EditField in Listfield

can you help me with the code actually what i am doing is

i have populated the rows by overriding the

 

public void drawListRow(ListField list, Graphics g, int index, int y, int w){

 

 

}

actually i am able to display the text and the image by overriding this method but dont know how to put the editfield there can you help me with this...

and i am adding it to the verticalfield manager working good its coming like

 

_____________________________

Repeat                                    image

_____________________________

but not the edit field .......

Please use plain text.
Developer
vishal_33
Posts: 104
Registered: ‎07-08-2010
My Device: blackberry bold
My Carrier: developer

Re: Place EditField in Listfield

HI friends customize horizontal field and you can able to add all three items as  you mention here.

 

Regards
Vishal Patel
Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Place EditField in Listfield

One trick with EditField and HFM is that the EditField will by default take the whole width.  So you need to restrict is width  This has been discussed a number of times on the forum, so search and you should find something. 

Please use plain text.
Developer
uttamtts
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: Place EditField in Listfield

can you send me the link i was searching for this but have not get any relevant information thank you
Please use plain text.
Developer
uttamtts
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: Place EditField in Listfield

can you give me some code snippet to add the eeditfield within listfield as i told i am overriding
public void drawListRow(ListField list, Graphics g, int index, int y, int w){





} method to display the text and image but dont have any clue how to add editfield there ....
Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Place EditField in Listfield

You can't add an EditField to a ListField.

 

With respect to searching for links to help you, what search arguments have you tried?

 

HorizontalFieldManager and EditField, seem like the obvious ones to me. 

Please use plain text.
Developer
uttamtts
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: Place EditField in Listfield

so is there any alternate way to achieve this ...
Please use plain text.
Developer
peter_strange
Posts: 19,595
Registered: ‎07-14-2008
My Device: Not Specified

Re: Place EditField in Listfield

Probably, but we need to know exactly what you are trying to achieve.  Why are you trying to add an EditField.  You could just use drawtext and display the text?

Please use plain text.