for your application case I would recommend to use the Outline Box. It is intended to manage other members (views, widgets, etc.) and it allows you to scroll them.
I hope it helps you further.
Outline Box has no scrollbars included. If you want scrollbars to appear, add the Horizontal Scrollbar or/and Vertical Scrollbar to your component explicitly and arrange it where you want it to appear.
Then you have to implement some glue code so the scrollbar is updated when the Outline Box is scrolled or its content changes. For this purpose you add a new slot method and connect it to Outline Box property OnUpdate as described in the section Enumerate and search views controlled by the Outline Box.
Within the method you implement the code to update the scrollbar according to the actual status of the Outline Box. For example in case of the Vertical Scrollbar:
// Get the area enclosing the views within the Outline Box as well as the
// visible area of the Outline Box itself.
var rect contentArea = Outline.GetContentArea( Core::ViewState[ Visible ]);
var rect outlineBounds = Outline.Bounds;
// Update the status of the scrollbar
VerticalScrollbar.ContentArea = contentArea.h;
VerticalScrollbar.ViewArea = outlineBounds.h;
VerticalScrollbar.Position = outlineBounds.y1 - contentArea.y1;
in such case, you implement again some 'glue' code to allow the interaction between the scrollbar and the Outline Box. Please see the section Implement scrollbar's slot methods. Accordingly to the description found there you have to:
Step 1: Add a new slot method to your component.
Step 2: Assign the slot method to scrollbars property OnScroll.
Step 3: Within the slot method implement the 'glue' code. In case of the vertical scroll direction the following code would be necessary:
Outline.ScrollOffset.y = -VerticalScrollbar.Position;
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!