Hello Simon,
now it's clear. In such case:
Step 1: You want the views to be automatically arranged horizontally side by side. For this purpose configure the property Formation of the Outline Box to e.g. Core::Formation.LeftToRight.
Step 2: From the above drawings I suppose you want the view row to be centered vertically within the Outline Box. If this is the case configure for each view its property Layout to the value Core::Layout[AlignToBottom, AlignToTop].
Step 3: The exciting part: you want all views, as a group to appear arranged in the center of the Outline Box. This is achieved by adjusting the property ScrollOffset of the Outline Box. Following code calculates from the actual position of the Outline Box content and the Outline Box boundary area the necessary displacement:
Outline.ScrollOffset.x += ( Outline.Bounds.center.x - Outline.GetContentArea( Core::ViewState[]).center.x );
Step 4: If you want the above position adjustment to be executed automatically each time the content of the Outline Box is changed, then:
Step 4.A: Put the above code line within a new slot method named e.g. centerOutlineBox. The slot method centerOutlineBox contains thus following code only:
Outline.ScrollOffset.x += ( Outline.Bounds.center.x - Outline.GetContentArea( Core::ViewState[]).center.x );
Step 4.B: Add a further new slot method and name it e.g. onUpdateOutlineBox and implement it with following code:
postsignal centerOutlineBox;
Step 4.C: Assign the method onUpdateOutlineBox to the property OnUpdate of the Outline Box.
This will have the effect that each time the Outline Box updates its content, the method onUpdateOutlineBox is invoked. This thereupon invokes the method centerOutlineBox which adjusts the scroll position in the Outline Box. See also:
Use Outline Box to scroll the embedded views
Enumerate and search views controlled by the Outline Box
Does t help you further?
Best regards
Paul Banach