Wt::WScrollArea Class Reference

A widget that adds scrolling capabilities to its content. More...

#include <Wt/WScrollArea>

Inheritance diagram for Wt::WScrollArea:

Inheritance graph
[legend]

List of all members.

Public Types

enum  ScrollBarPolicy { ScrollBarAsNeeded, ScrollBarAlwaysOff, ScrollBarAlwaysOn }

Public Member Functions

 WScrollArea (WContainerWidget *parent=0)
 Creates a scroll area.
void setWidget (WWidget *widget)
 Sets the widget that is the contents of the scroll area.
WWidgettakeWidget ()
 Remove the widget content.
WWidgetwidget () const
 Returns the widget content.
WScrollBarhorizontalScrollBar () const
 Returns the horizontal scrollbar.
WScrollBarverticalScrollBar () const
 Returns the vertical scrollbar.
void setScrollBarPolicy (ScrollBarPolicy scrollBarPolicy)
 Returns the policy for both scrollbars.
void setHorizontalScrollBarPolicy (ScrollBarPolicy scrollBarPolicy)
 Returns the horizontal scroll bar policy.
void setVerticalScrollBarPolicy (ScrollBarPolicy scrollBarPolicy)
 Returns the vertical scroll bar policy.


Detailed Description

A widget that adds scrolling capabilities to its content.

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 on a WContainerWidget (see WContainerWidget::setOverflow()).

CSS

This widget is rendered using a <div> with a CSS overflow attribute. It can be styled using inline or external CSS as appropriate.


Member Enumeration Documentation

brief Policy for showing a scrollbar.

Enumerator:
ScrollBarAsNeeded  Automatic.
ScrollBarAlwaysOff  Always show a scrollbar.
ScrollBarAlwaysOn  Never show a scrollbar.


Member Function Documentation

void Wt::WScrollArea::setWidget ( WWidget widget  ) 

Sets 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  ) 

Returns the policy for both scrollbars.

See also:
setHorizontalScrollBarPolicy(), setVerticalScrollBarPolicy()

void Wt::WScrollArea::setHorizontalScrollBarPolicy ( ScrollBarPolicy  scrollBarPolicy  ) 

Returns the horizontal scroll bar policy.

See also:
setScrollBarPolicy()

void Wt::WScrollArea::setVerticalScrollBarPolicy ( ScrollBarPolicy  scrollBarPolicy  ) 

Returns the vertical scroll bar policy.

See also:
setScrollBarPolicy()


Generated on Fri Mar 26 17:12:07 2010 for Wt by doxygen 1.5.6