BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 10-01-2008, 11:35 AM   #1 (permalink)
New Member
Join Date: Oct 2007
Model: 8100
Carrier: Orange
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Customised VerticalFieldManagers with padding

Please Login to Remove!

Iím trying to create a UI similar to the new 9000 style UI (example image at "").

I am using a customised VerticalFieldManager for the outer grey area and a second customised VerticalFieldManager for the inner white boxes. I am using the new BorderFactory class to try and imitate the rounded corners. In order to create the padding between the edge of the screen and the inner boxes I am overriding the sublayout method on the outer VerticalFieldManager.

This code produces the result shown at "" with the bottom border visible

protected void sublayout(int iWidth, int iHeight)
super.sublayout(iWidth, iHeight);

setExtent(iWidth, iHeight);

However, in order to add the padding I need to position the inner VerticalFieldManagers myself. The code below shows what I think should be happening (without the extra padding), but it doesnít give me the expected result Ė i.e. the bottom border is not visible (see image at "").

protected void sublayout(int iWidth, int iHeight)
int iNumFields = getFieldCount();
int iYPos = 0;

for (int i = 0; i < iNumFields; i++)
Field fField = this.getField(i);

setPositionChild(fField, 0, iYPos);
layoutChild(fField, iWidth, iHeight);

iYPos = iYPos + fField.getHeight();

setExtent(iWidth, iHeight);

I have exhausted the forums and Googled this issue to death. Any ideas what I am doing wrong here?
Old 10-29-2008, 04:24 PM   #2 (permalink)
Knows Where the Search Button Is
Join Date: Oct 2008
Model: None
Carrier: Vodafone
Posts: 34
Post Thanks: 0
Thanked 0 Times in 0 Posts

Hi, I would be interested to know if you ever figured out a simple way to do this? I am attempting to get a similar look for my application UI and can't seem to get the results I am looking for (e.g. the rounded corner borders that the tasks app has) using BorderFactory and Border.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

24" Universal Thermocouple White Rodgers Gas pilot light control w/adapters
OMEGA COLD JUNCTION COMPENSATOR THERMOCOUPLE  pictureThermocouple Kit 24in,No 9294, Camco Mfg
Thermocouple Kit 24in,No 9294,  Camco Mfg picture Simpson # 0190 General Purpose Thermocouple for Model 388 & 388-3L Thermometer
 Simpson # 0190  General Purpose Thermocouple for Model 388 & 388-3L Thermometer pictureNEW THERMOCOUPLE VACUUM FEEDTHROUGH

Copyright © 2004-2016
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.