12-17-2011 02:38 AM - edited 12-17-2011 02:40 AM
On one screen I have options that are stored in memory that label buttons on another screen. After the options have been saved in memory on that options screen I pop the screen to reveal the screen with buttons. How can I get the buttons to reflect the new names without the screen getting all mussed up? I tried onexposed method for the main screen with the buttons and setLabel(), but it reshapes the sizes of the buttons after the labels are set and the screen looks like it has been zoomed in. How can I get it so the screen redoes the whole layout? I've tried invalidate and dopaint to no avail. The buttons are on a grid. They are half the page size. The grid is fixed width. I want to maintain that even grid spacing and size.
12-18-2011 06:17 PM
updateLayout (of any Field, including your Screen) causes the whole screen to re-layout. Use it instead of invalidate (which only causes the invalidated field to redraw.
However, your problem might lie elsewhere - setLabel on ButtonFields re-layouts anyway. If updateLayout doesn't work, see if you have any custom layout/sublayout methods and whether they are doing the right thing.