View Single Post
Old 08-07-2007, 02:03 AM   #1
tschiefer
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 44
Default Formating HorizontalFieldManager

Please Login to Remove!

I'm writting an address book and would like to display a title on the top of the screen. The title should be from style:
|Address Book (Bitmap)|
where "Address Book" should remain on the left and the Bitmap on the right side of the screen. Somehow i don't get it working right.
Here is the code i tried.
Code:
HorizontalFieldManager topManager = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
VerticalFieldManager titleManager = new VerticalFieldManager(VerticalFieldManager.FIELD_LEFT);
VerticalFieldManager logoManager = new VerticalFieldManager(VerticalFieldManager.FIELD_RIGHT);

LabelField title = new LabelField("Title", LabelField.FIELD_LEFT);
BitmapField logo = new BitmapField(Bitmap, BitmapField.FIELD_RIGHT);

titleManager.add(title);
logoManager.add(logo);
topManager.add(titleManager);
topManager.add(logoManager);

myScreen.setTitle(topManager);
I would appreciate some help and suggestions.
Offline   Reply With Quote