Once you have added a Horizontal Scrollbar or/and Vertical Scrollbar to your component and arrange it where you want it to appear you implement some glue code so the scrollbar is updated when the Outline Box is scrolled or its content changes. For this purpose you:
Step 1: 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.
Step 2: Within the slot 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;
See also the section: Determine the scrollbar's current scroll position and scroll range (for the Vertical scrollbar) or the same for the horizontal scrollbar.
I hope it helps you further.
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!