01-03-2013 01:21 AM
I've got a MainScreen, on which I have added several VerticalFieldManagers. Those VFMs contain some LabelFields, as well as other VFMs. This last set of VFM's also contain LabelFields.
I have a problem when the lowest level VFM isn't totally in focus (I don't know how else to describe it).
Refer to the images I added. The first image shows the screen as it first appears when rendered. The area half displayed at the bottom (with the border) is my lowest level VFM.
Now when I scroll down (second image), the missing labels appear ( ie " Low wind < 10 km/h ): " ) . Notice that the other labels (2.3 km) appear fine (though this isn't always the case, but will suffice for this example I think).
The VFMs are simple (adding LabelFields and using sublayout() to arrange them). Can someone tell me what I need to do to fix this?
Solved! Go to Solution.
01-04-2013 05:18 AM
Did you try to invalidate the screen to force it to redraw everything?
01-04-2013 05:34 AM
Invalidate would be a good thing to try, but it should not be needed.
Sorry the only suggestion I have is that you try the same thing with everything 'standard', ad then add back in the various complications you have (for example, the sublayouts) until it breaks.
Can you post a simple example that we can play with that demonstrates the problem?
01-04-2013 11:52 AM
If you extend VerticalFieldManager and rearrange some fields manually inside its sublayout, you might get this exact behavior due to its paint optimization (I suppose). If your Manager needs anything fancier than a simple vertical or horizontal arrangement of the fields, either add other managers inside (such as a HorizontalFieldManager to which you then add your LabelFields) or extend Manager and fully implement your own sublayout.
Built-in Managers have all kinds of internal tricks which are also bound to change between OS versions. You don't want to override their sublayout much if at all.
01-06-2013 04:03 PM
@crispyoz - I have tried using invalidate() with no success, however I'm never really certain where/when to use it anyway.
@peter_strange - I did some minimalizing before I posted, and when I added the 3rd row of labels is when the behaviour started. Unfortunately I can't be sure if it's the number of Fields that is causing a problem or the real estate that they are using (making the containing manager behave differently if it scrolled partially off the screen).
@arkadyz - I have overridden a lot of sublayout()'s - your comment worries me! :-) I have done that in this case as well, I will try to redesign the screen with some simpler managers and see what happens.
Thanks to all of you for your suggestions.
01-21-2013 12:11 AM
I rebuilt the page with a (complicated) series of embedded managers and the refresh/scroll seems to work correctly now. Thanks to everyone for their suggestions.