This code places a single Elementary list widgets on a window, exemplifying a part of the widget's A\-P\-I.

First, we will just create a simple list, as done on \hyperlink{list_example_01}{List widget 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"}
     \};
   li = elm_list_add(win);
   evas\_object\_size\_hint\_weight\_set(li, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm_win_resize_object_add(win, li);

   \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}


Now, let's customize this list a bit. First we will display items horizontally\-: 
\begin{DoxyCodeInclude}
   elm_list_horizontal_set(li, EINA\_TRUE);

\end{DoxyCodeInclude}


Then we will choose another list mode. There are four of them, and the default \hyperlink{group__List_gad05499f0b0c907a953ef8650823ae428}{Elm\-\_\-\-List\-\_\-\-Mode} is \hyperlink{group__List_ggad05499f0b0c907a953ef8650823ae428a66e50ab227b49eaecd5512fbf6cd4b5f}{E\-L\-M\-\_\-\-L\-I\-S\-T\-\_\-\-S\-C\-R\-O\-L\-L}. Let's set compress mode\-: 
\begin{DoxyCodeInclude}
   elm_list_mode_set(li, ELM_LIST_COMPRESS);

\end{DoxyCodeInclude}


To enable multiple items selection, we need to enable it, since only one selected item is allowed by default\-: 
\begin{DoxyCodeInclude}
   elm_list_multi_select_set(li, EINA\_TRUE);

\end{DoxyCodeInclude}


We are not adding items with callback functions here, since we'll explain it better on \hyperlink{list_example_03}{List -\/ Items management}. But if the callback need to be called everytime user clicks an item, even if already selected, it's required to enable this behavior\-: 
\begin{DoxyCodeInclude}
   elm_list_select_mode_set(li, ELM_OBJECT_SELECT_MODE_ALWAYS);

\end{DoxyCodeInclude}


Finally, if a bounce effect is required, or you would like to see scrollbars, it is possible. But, for default theme, list scrollbars will be invisible anyway. 
\begin{DoxyCodeInclude}
   elm_scroller_bounce_set(li, EINA\_TRUE, EINA\_TRUE);
   elm_scroller_policy_set(li, ELM\_SCROLLER\_POLICY\_AUTO,
                           ELM\_SCROLLER\_POLICY\_ON);

\end{DoxyCodeInclude}


See the full \hyperlink{list_example_02_8c-example}{list\-\_\-example\-\_\-02.c} code, whose window should look like this picture\-:

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