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: 18
Registered: ‎12-16-2009
My Device: 8330
My Carrier: sprint
Accepted Solution

Newbie- formatting editfields on screen

HI all, this seems like it should be simple-

 

My screen class extends MainScreen and adds a bunch of EditFields.  How do I get the labels to align vertically along the left margin of the screen and the data entry fields align vertically along the right edge of the screen?  Please look at the default AppointmentItem to see what I am trying to accomplish.

 

Thanks, Steve

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Newbie- formatting editfields on screen

There is no stock control that does what you want (if I understand the question).

 

Edit fields all take the entire width of the display by default; the label takes as much as it needs and the text box takes the rest.

 

When you right -justify the text box, how much space are you taking, and which way should the text fill the input area?

 

I think you are maybe looking at the date fields on the screen you mention?

 

Anyway, this will require that you either write your own custom edit field, extend one of the ones that exist, or patch something up using a HorizontalFieldManager containing a separate label fiekd and input field (so that you can justify the two fields independently).

 

 

 

 

Highlighted
Developer
Posts: 18
Registered: ‎12-16-2009
My Device: 8330
My Carrier: sprint

Re: Newbie- formatting editfields on screen

Exactly the direction I began after posting, thanks for confirming.