09-04-2009 04:23 AM
I am using a custom layout manager and trying to relatively offset positions of fields based on their width and height. I have tried calling Field.getWidth() and Field.getHeight() from both in the custom layout manger and from my main class, but I get a return value of '0' for almost all cases. The only time so far I can tell that the correct width and height are returned,is after the fields are placed within the manager, which means they are not in the correct position.
Thank you for any help.
09-04-2009 06:01 AM - edited 09-04-2009 06:30 AM
Thank you. Instead of the getWidth() and getHeight() methods, I tried using Field.getExtent() in the custom layout manager sublayout() method and it is workin.
This is before calling setPositionChild()*edit*, so I am not sure why the getHeight() and getWidth() don't work while this way does.