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
New Developer
Posts: 13
Registered: ‎09-21-2009
My Device: Not Specified
Accepted Solution

setMargin / setPadding (undocumented)

Hi,

 

While playing arround with cunstom layouts i came accross the

Field#setPadding(int,int,int,int,

Field#setMargin(int,int,int,int),

Field#getPaddingTop() [Bottom, Left, Right]

Methods which would be useful but i seem not to be able to find this methods in the Javadoc (up to 5.0).

 

My code should be running down to 4.2.1 so I would be grateful if you could give me some advice regarding the safety of this methods or if there are methods which I could use to achieve an equal behaviour.

 

 

Regards

J. O.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: setMargin / setPadding (undocumented)

At DevCon, one of the RIM presenters indicated that setPadding and getPadding is safe to use from 4.2. 

 

However I understand the Eclipse might not like setPadding.  I use JDE atm so this is not a problem to me.

 

I have in the past used SpacerFields to achieve the same result, however I will be swapping to using setPadding.

 

setMargin was not mentioned.

New Developer
Posts: 13
Registered: ‎09-21-2009
My Device: Not Specified

Re: setMargin / setPadding (undocumented)

Thanks

 

Hopefully they keep the methods in upcoming os versions Smiley Happy.