09-08-2011 12:42 PM - edited 09-08-2011 01:12 PM
Does anyone know how to set the x,y position of a ListField or ObjectListField?
I am testing on the Blackberry 9700 ATT simulator, running OS 5.0.
I am trying to use an ObjectListField to create subMenu's in OS 5.0 and I have set the width using getPreferredWidth() so that it doesn't occupy the entire screen. So it's beginning to look like a system menu, but it's default x,y position is at 0,0 and I need to change that.
Solved! Go to Solution.
09-08-2011 10:18 PM
setMargin works great for this.
You can use it like this
myfield.setMargin(y, 0, 0, x); // top, right, bottom, left
09-09-2011 09:18 AM
that did the trick, I wonder why Blackberry doesn't have a setPosition() method where you specify just x,y coordinates? Anyway, I'm glad it works.