BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-01-2008, 07:06 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: 8820
PIN: N/A
Carrier: Airtel
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default manipulating Position of Manager

Please Login to Remove!

Hi,

Can anyone please tell me how to manipulate position of a HorizontalFieldManager on the Screen.

I mean, just like we can manipulate positions of Fields using setPosition(),
how can we do that with a Manager.

What I have to do is, I've added all the components in one HorizontalFieldManager, and I want to place this Manager exactly at the center of the screen.

I have used the following code:-

mainVfm = new VerticalFieldManager(FIELD_VCENTER|FIELD_HCENTER);

But,It displays the manager Horizontally centered only.


With regards,
Flavian
Offline  
Old 08-01-2008, 07:46 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Manager inherits setPosition from Field. As does (Main)Screen.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-02-2008, 12:41 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: 8820
PIN: N/A
Carrier: Airtel
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I tried setPosition() method.

It has protected access. HorizontalFieldManager cannot have access to that method.

Is there any other way out?

With Regards,
Flavian
Offline  
Old 08-02-2008, 01:46 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: May 2008
Model: 8310
PIN: N/A
Carrier: ATT
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Extend HorizontalFiedManager to access setPosition method. You need to create another public method, say setCoordinates() and call setPosition() from within that method.

Code:
public class MyHorizontalFieldManager extends HorizontalFieldManager {

    public void setCoordinates(int x,int y){
        setPosition(x,y);
    }

}
But I don't know if calling setPosition() would actually place it at the specified co-ordinates. I don't really trust HorizontalFieldManager.You need to try it. If not, you might want to make your own FieldManager.
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

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

OMEGA Digital Vacuum Gauge DVG64 - NIB
$150.0
OMEGA Digital Vacuum Gauge DVG64 - NIB picture600+ Gallon Pressure/Vacuum Portable Tank
$500.0
600+ Gallon Pressure/Vacuum Portable Tank pictureHPS HTSVH8-CLEARx5 Clear 5' Length High Temperature Silicone Vacuum Tubing Hose
$23.12
HPS HTSVH8-CLEARx5 Clear 5' Length High Temperature Silicone Vacuum Tubing Hose pictureHPS HTSVH127-CLEARx5 Clear 5' Length High Temperature Silicone Vacuum Tubing
$42.92
HPS HTSVH127-CLEARx5 Clear 5' Length High Temperature Silicone Vacuum Tubing pictureTBK Automatic OCA Glass Separator Remover 14" Built In Vacuum iPhone Android
$0.99
TBK Automatic OCA Glass Separator Remover 14






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