08-24-2010 10:04 AM
In my quest to develop a formScreen GUI, I have come up with this:
It looks a bit clumsy without spacing between each box..
Can anyone please tell me how to insert just small horizontal spacing between each of the boxes?
Solved! Go to Solution.
08-24-2010 10:55 AM
If you check 6.0 documentation for Field, you will find setPadding(), setMargin() as well as all kinds of getPadding... and getMargin... methods. Even though the documentation says there are available since 6.0.0, in fact there were there - undocumented but working - since probably 4.0.0 (when XYEdges became available). I know for sure that they work in 4.2.1. If you check the source code from this article
which states that it applies to BlackBerry 4.2.0 and later, you will find setPadding and setMargin there.
In fact, studying (not just using!) that source code is extremely useful for any serious BlackBerry UI developer. The code is not perfect (well, whose code is?), but it is much farther down the way of creating a likable UI than anything I have personally seen. You have setExtent (frequently seen here in the forums) and setVirtualExtent (very rarely used and explained though necessary for creating scrolling Managers) examples, all kinds of layoutChild and setPositionChild usage (the main building blocks for creating highly customized layouts) etc. - you name it, they have it.