

This example is very short and will illustrate one way to use a scroller. We\textquotesingle{}ll omit the declaration of the {\ttfamily text} variable because it\textquotesingle{}s a very long  ipsum lorem . If you really want to see the full code, it\textquotesingle{}s \hyperlink{scroller_example_01_8c-example}{scroller\+\_\+example\+\_\+01.c}.

We start our example by creating our window and background\+: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


Next we create a label and set it\textquotesingle{}s text to {\ttfamily text(very long ipsum lorem)}\+: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


We then create our scroller, ask that it have the same size as the window and set its content\+: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


We are now going to set a number of properties in our scroller\+: \begin{DoxyItemize}
\item We make it bounce horizontally but not vertically. \item We make both scrollbars always be visible. \item We have the events be propagated from the content to the scroller. \item We enforce a page policy vertically(having a page be the size of the viewport) and leave horizontal scrolling free. \item And finally we ask the scroller to show us a region starting at 50,50 and having a width and height of 200px. 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}
 \begin{DoxyNote}{Note}
Observant reader will note that the \hyperlink{group__Elm__Scroller_ga50e68aa62753b2d1f5b63d072cd74215}{elm\+\_\+scroller\+\_\+region\+\_\+show()} didn\textquotesingle{}t scroll the view vertically, this is because we told the scroller to only accept vertical scrolling in pages.
\end{DoxyNote}
And now we\textquotesingle{}re done\+: 
\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}
\end{DoxyItemize}
Our example will look like this\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/scroller_example_01}}
\end{DoxyImageNoCaption}
 