04-11-2012 06:07 AM - edited 04-11-2012 07:02 AM
I'm creating a custom manager where the contained fields overlap with each other (just like folder tabs) and I want the field to be displayed on top of other tabs when selected.
What I did were (but all failed)
Does anyone know how to rearrange their display stack order? Is it even possible?
Solved! Go to Solution.
04-11-2012 06:43 AM
This is only my understanding.... Not fact.
My understanding is that a Manager will display or paint the Fields in the order that they are added. Focus will also be default move in this way. When focus moves, the Field is repainted with focus, but what this really means is that the area of the Screen is repainted. The Manager will know the Fields that are displayed in the area that needs to repainted and will ask them to repaint themselves.
So if you have two Fields and they overlap, the second Field will always paint over the first Field, which is not what you want if the first Field is in focus.
In short, using my 'model', if you want something on top, it has to be the last thing added to the Manager.
So when focus moves, you also have to add and remove Fields to the manager. This is not an operation that I would actually recommend. Changing Field in Managers in this way is 'expensive' in terms of the processing and might slow the whole thing down, if in fact it works - I am not sure how well a Manager would cope with having the Field in focus removed and re added. But it is probably the easier option, at least the easiest I can think of. The only other option I can think of involves some fancy paint processing.
Do you want to give this a go and see how you get on?