Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520
My Carrier: TMN

center image on vertical field manager

Hi,

 

I want  to center _Image0 on Vertical Field manager vfmB. My is something like this:

 

vfmB = new VerticalFieldManager(VerticalFieldManager.FIELD_HCENTER|VerticalFieldManager.FIELD_VCENTER);

...

vfmB.add(_Image0);

add(vfmB);

 

but it doesn´t work and from other posts i can't find it out.

 

Best Regards,

JPP

................................................................................................
Tech On!
PTNews
more at On On On!
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: center image on vertical field manager

Here is one of the links that should help you:

How to center, horizontally and vertically

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Regular Contributor
Posts: 96
Registered: ‎06-09-2011
My Device: sdk 9800
My Carrier: java development

Re: center image on vertical field manager

Hi,

 

 

for the FIELD_HCENTER and FIELD_VCENTER u will get the image at top and where x and y positions are (0,0).

 

to get image at the center u need to override layout method and within the layout method u just specify the dimensions whatever u want.

 

 

Thank u

Press the Kudos button (star) on the left side to thank and
please mark the Thread as solved if its solved...


Thanks and Regards
Nagarjuna