This code places a single Elementary list widgets on a window, just to exemplify the more simple and common use case\-: a list will be created and populated with a few items.

To keep it simple, we won't show how to customize the list, for this check \hyperlink{list_example_02}{List widget example}. Also, we won't focus on items management on this example. For an example about this subject, check \hyperlink{list_example_03}{List -\/ Items management}.

To add a list widget.  
\begin{DoxyCodeInclude}
   li = elm_list_add(win);

\end{DoxyCodeInclude}


We are just adding the list, so as you can see, defaults for it are\-: \begin{DoxyItemize}
\item Items are displayed vertically. \item Only one item can be selected. \item The list doesn't bounce.\end{DoxyItemize}
To add items, we are just appending it on a loop, using function \hyperlink{group__List_ga80c4ef3e5b22f056615114b6e2d75cf9}{elm\-\_\-list\-\_\-item\-\_\-append()}, that will be better explained on items management example.  
\begin{DoxyCodeInclude}
   \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *lbl[] =
     \{
        \textcolor{stringliteral}{"Sunday"},
        \textcolor{stringliteral}{"Monday"},
        \textcolor{stringliteral}{"Tuesday"},
        \textcolor{stringliteral}{"Wednesday"},
        \textcolor{stringliteral}{"Thursday"},
        \textcolor{stringliteral}{"Friday"},
        \textcolor{stringliteral}{"Saturday"}
     \};
   \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(lbl) / \textcolor{keyword}{sizeof}(lbl[0]); i++)
     elm_list_item_append(li, lbl[i], NULL, NULL, NULL, NULL);

\end{DoxyCodeInclude}


After we just want to show the list. But first we need to start the widget. It was done this way to improve widget's performance. So, always remember that\-: \begin{DoxyWarning}{Warning}
Call elm\-\_\-list\-\_\-go before showing the object 
\begin{DoxyCodeInclude}
   elm_list_go(li);
   evas\_object\_show(win);

\end{DoxyCodeInclude}

\end{DoxyWarning}
See the full \hyperlink{list_example_01_8c-example}{list\-\_\-example\-\_\-01.c} code, whose window should look like this picture\-:

 
\begin{DoxyImage}
\includegraphics{screenshots/list_example_01}
\caption{width=}
\end{DoxyImage}
 