#include <WScrollArea>
Public Types | |
enum | ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn } |
Public Member Functions | |
WScrollArea (WContainerWidget *parent=0) | |
Create a scroll area. | |
void | setWidget (WWidget *widget) |
Set the widget that is the contents of the scroll area. | |
WWidget * | takeWidget () |
Remove the widget content. | |
WWidget * | widget () const |
Get the widget content. | |
WScrollBar * | horizontalScrollBar () const |
Get the horizontal scrollbar. | |
WScrollBar * | verticalScrollBar () const |
Get the vertical scrollbar. | |
void | setScrollBarPolicy (ScrollBarPolicy scrollBarPolicy) |
Set the policy for both scrollbars. | |
void | setHorizontalScrollBarPolicy (ScrollBarPolicy scrollBarPolicy) |
Set the horizontal scroll bar policy. | |
void | setVerticalScrollBarPolicy (ScrollBarPolicy scrollBarPolicy) |
Set the vertical scroll bar policy. |
Use a WScrollArea to add scrolling capabilities to another widget. When the content is bigger than the WScrollArea, scrollbars are added so that the user can still view the entire content.
Use setScrollBarPolicy() to configure if and when the scrollbars may appear.
In many cases, it might be easier to use the CSS overflow property
void Wt::WScrollArea::setWidget | ( | WWidget * | widget | ) |
Set the widget that is the contents of the scroll area.
Setting a new widget will delete the previously set widget.
void Wt::WScrollArea::setScrollBarPolicy | ( | ScrollBarPolicy | scrollBarPolicy | ) |
Set the policy for both scrollbars.
void Wt::WScrollArea::setHorizontalScrollBarPolicy | ( | ScrollBarPolicy | scrollBarPolicy | ) |
void Wt::WScrollArea::setVerticalScrollBarPolicy | ( | ScrollBarPolicy | scrollBarPolicy | ) |