07-11-2010 06:07 PM - last edited on 07-11-2010 06:31 PM
i have a labelfield that i want to position somewhere on the screen. how do i go about doing this? setPadding and setMargin work, but they shift everything else (i want to position a labelfield somewhere on top of a bitmapfield). thanks in advance.
07-11-2010 07:13 PM
Mainly "NegativeMagins" this is what I was telling you in your other post, use negative margins to overlay fields.
07-11-2010 07:25 PM
You can also write your own custom layout manager if none of the standard managers does exactly what you want. See How to Create a Custom Layout Manager for a Screen in the knowledge base.
07-11-2010 07:25 PM
but i read somewhere that setMargin was deprecated on newer operating systems. it isn't even documented and i don't know what its arguments are. is this the same for setPadding btw?
07-11-2010 07:41 PM - last edited on 07-11-2010 07:42 PM
a quick question about the custom layout manager: do i need to declare the field objects in the sublayout() part or do i add them to the custom layout manager and then modify their properties by getting their index numbers (e.g. getField(0).[some property] to access the first object)?
07-11-2010 08:44 PM
The latter. You should not add the fields in sublayout; that gets called whenever the screen needs layout. You can add them in the constructor, using add() or through your own custom methods. You can access the fields by index or you can design your custom manager to store references to specific fields in instance variables.
RIM has a nice video here on creating a custom manager.