Scroll

Show a part of view with scrollbar.

Modulerequire("yue.gui")
TypeClass
InheritsView

The Scroll view can show an arbitrary content view inside it.

When the content is larger than the Scroll view, scrollbars will be optionally showed. When the content view is smaller then the Scroll view, the content view will be resized to the size of the Scroll view.

Class methods

create()

Create a new Scroll view.

Return

Scroll

Methods

setcontentview(view)

Set the content view.

Parameters

getcontentview()

Return the content view.

Return

View

setcontentsize(size)

Set the size of content view.

Parameters

getcontentsize()

Return the size of content view.

Return

SizeF

setscrollbarpolicy(hpolicy, vpolicy)

Change the display policy for horizontal and vertical scrollbars.

Parameters

getscrollbarpolicy()

Return the display policy of horizontal and vertical scrollbars.

Return

Scroll::Policy, Scroll::Policy