BlackBerryForums.com : Your Number One BlackBerry Community  
   

»Sponsored Links



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

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.
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
simon.hain Offline
CrackBerry Addict
 
Posts: 711
Join Date: Apr 2005
Location: hamburg, germany
Model: 8700
Carrier: o2
Default 07-02-2008, 09:50 AM

create your own manager


java developer, Devinto, hamburg/germany
   
Reply With Quote
  (#3 (permalink)) Old
omrib Offline
Knows Where the Search Button Is
 
Posts: 20
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Default 07-02-2008, 02:52 PM

The default Vertical Screen manager cant center fields vertically?
   
Reply With Quote
  (#4 (permalink)) Old
holy3daps Offline
Thumbs Must Hurt
 
Posts: 98
Join Date: Apr 2006
Location: Boston
Model: 8xxx+
Carrier: All Of The Above
Default Centering Fields - 07-02-2008, 03:18 PM

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!
   
Reply With Quote
  (#5 (permalink)) Old
omrib Offline
Knows Where the Search Button Is
 
Posts: 20
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
Default 07-03-2008, 09:35 AM

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?
   
Reply With Quote
  (#6 (permalink)) Old
simon.hain Offline
CrackBerry Addict
 
Posts: 711
Join Date: Apr 2005
Location: hamburg, germany
Model: 8700
Carrier: o2
Default 07-03-2008, 10:39 AM

you can use a spacerfield or create your own manager.


java developer, Devinto, hamburg/germany
   
Reply With Quote
Reply


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






Copyright © 2004-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1