BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-02-2008, 08:57 AM   #1
omrib
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Posts: 26
Default how do i center my fields verticly

Please Login to Remove!

Hey everyone.
I'm trying to set my VerticalFieldManager to center my fields in it verticly, so that it will space up my fields.

i tried creating the manager this way
VerticalFieldManager(VerticalFieldManager.FIELD_V CENTER
| VerticalFieldManager.USE_ALL_HEIGHT);

but still, all my fields go one after the other on the top and i get a lot of empty space in the bottom.

what is the recommended way to space up the fields? (or how to i center the fields vertically)

Also, whats the difference from VCENTER and FIELD_VCENTER?

thanks in advance.
Omri.
Offline  
Old 07-02-2008, 09:50 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

create your own manager
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 07-02-2008, 02:52 PM   #3
omrib
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Posts: 26
Default

The default Vertical Screen manager cant center fields vertically?
Offline  
Old 07-02-2008, 03:18 PM   #4
holy3daps
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Default Centering Fields

Hi!

So, are you looking to do something like this (A):

.........Field 1.........
.........Field 2.........
.........Field 3.........

Or something like this (B):

..................................
..................................
..................................
..Field 1..Field 2..Field 3..
..................................
..................................
..................................

(A) centers fields horizontally (all fields are aligned with the horizontal center of the screen)
(B) centers fields vertically (all fields are aligned with the vertical center of the screen)

Using just a VerticalFieldManager all by itself will do neither of these - a VFM only lays out each field it contains vertically, one row at a time, left-justified.

To do (A), you need two things: a VFM (to layout each field on its own separate line), and a Style value (Field.FIELD_HCENTER) set on each field through the field's constructor.

To do (B), you may be able to get away with using a HorizontalFieldManager (to layout each field in one row, left to right), and a Style value (Field.FIELD_VCENTER) set on each field through the field's constructor. However, not actually having done this myself, I'm not sure whether that will actually give you (B) - it may vertically center the fields in the first "row", which will be the top of the screen. You may be able to combat this by setting the style value of the HFM to Field.FIELD_VCENTER.

If you're really aggressive and/or curious and/or bored, you can create your own brand of Manager, and do it brute-force.

Experiment! That's what coding is all about, really. And that's why God invented BlackBerry simulators.....

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 07-03-2008, 09:35 AM   #5
omrib
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Posts: 26
Default

actually what i want is something else.
say i have 5 lines of space on the device, but i only put 3 fields.
so i want something like

field.....
..........
field.....
..........
field.....

Is that possible with the vertical manager? or do i need to create my own custom manager?
Offline  
Old 07-03-2008, 10:39 AM   #6
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

you can use a spacerfield or create your own manager.
__________________
java developer, Devinto, hamburg/germany
Offline  
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


MSA Altair 5X  picture

MSA Altair 5X

$750.00



MSA Altair 5X Gas Detector Industrial Kit - LEL, O2, CO, H2S picture

MSA Altair 5X Gas Detector Industrial Kit - LEL, O2, CO, H2S

$712.50



Vintage M188 voice generator for S-100 bus computers circuit board IMSAI ALTAIR picture

Vintage M188 voice generator for S-100 bus computers circuit board IMSAI ALTAIR

$72.00



MSA Altair 4XR - Multi  Gas Meter (LEL, O2, CO, H2S) picture

MSA Altair 4XR - Multi Gas Meter (LEL, O2, CO, H2S)

$999.00



Altair2X Co Instrument CO Gas Detector picture

Altair2X Co Instrument CO Gas Detector

$399.99



MSA 10106725 Sensor with Alarms 10/1700 ppm with Altair 4X/5X Multi-Gas Detector picture

MSA 10106725 Sensor with Alarms 10/1700 ppm with Altair 4X/5X Multi-Gas Detector

$200.00







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