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
Trusted Contributor
swapnil_gadkari
Posts: 200
Registered: ‎02-22-2010
My Device: BlackBerry 9550
Accepted Solution

Button not displayed even if added properly...

hi all, i'm using jde 4.5 in which i cannot see the button get added even if i have added. when i remove horizontalfieldmanager it get displayed? plz help HorizontalFieldManager hfm = new HorizontalFieldManager(Manager.USE_ALL_WIDTH); _txtsearch = new BasicEditField("", " "); hfm.add(_txtsearch); // add(_txtsearch); _search = new ButtonField("Search"); hfm.add(_search); // add(_search); this.add(hfm);
Swapnil G.
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Button not displayed even if added properly...

[ Edited ]

If you use the insert code icon (scroll the icons you see above the text entry box and look for the tooltip name to find it), then you code is readable.

 

Your issue is that a BasicEditField will take up the whole width of your screen.  If you want to see the Button, you need to restrict the width of this Field.  This is discussed in a number of other posts on this forum so I won't repeat it here.

 

Alternatively, add your button first. 

Trusted Contributor
swapnil_gadkari
Posts: 200
Registered: ‎02-22-2010
My Device: BlackBerry 9550

Re: Button not displayed even if added properly...

extremely sorry for the way i have pasted the code since i forgot to do that using "insert" option. thanks for ur suggestion
Swapnil G.