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
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: activeautotexteditfield URL opening native browser

Can you tell us what is wrong with the alignment?.

 

From what I see, it all looks pretty good except for the length of the first row you display.  My immediate thought on that one is that the text you are displaying includes loads of white space (new line characters or blanks say) at then end.  You might have to get rid of these. 

 

That said, you will probably want to limit the height of the Field you display anyway.  Your ListField did this automatically.  But the fact that the Manager is now being displayed means that it is not limited.  So you will have to do this yourself.

 

Personally in this case, I would actually limit the height of the TextField by overriding its layout(), and calling super.layout with the height restricted to the maximum you will want to use.  You will probably want to specify this height as a multiple of the font size for the Field, say 3 * Font Size to display 3 lines.

 

That said, I am not an expert of getting these heights set perfectly, so please experiment and let us know how you get on - if it doesn't work, then someone else might be able to help.

Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630
My Carrier: MTN

Re: activeautotexteditfield URL opening native browser

if u observe the content of the second and third row . you will see that the content is not complete , even if i increse the height of the activerichtextfield i still get the same issue , i really need a way outta this.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: activeautotexteditfield URL opening native browser

I suspect there is something in your layout or sublayout that is doing this - the TextFields will normally request as much space as they need.  So look there.  It might be in the sublayout for the Row. 

Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630
My Carrier: MTN

Re: activeautotexteditfield URL opening native browser

Thanks peter , 

I finally got it working the problem was actually from my getPrefferedHeight of the tablerowmanager method , i did something wrong , i was calculating this to be the total sum of heights of the various fields in the manager , i removed that method and  just placed a fixed hieght in my setExtent method which is in my sublayout method(custom manager) , thanks for the time and support peter , stay  blessed .

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: activeautotexteditfield URL opening native browser

Glad you have it all working. 

 

"placed a fixed height in my setExtent method which is in my sublayout method(custom manager)"

 

Always very wary of having a fixed height.  Would it be better to have this vary according to font size or something like that? 

 

Fixed height is problematic if you are trying to run the same code on some low res device like 9320 and high res device like 9860. 

Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630
My Carrier: MTN

Re: activeautotexteditfield url opening native browser

Well if I wuld have to do that and it is much more better give me a hint. Codingly *smiles*