For our second example we\textquotesingle{}ll create a table with 4 rectangles in it.

Since our rectangles are of different sizes our table won\textquotesingle{}t be homogeneous.

The interesting bits from this example are\+: \begin{DoxyItemize}
\item Where we set the table as not homogeneous\+:  
\begin{DoxyCodeInclude}
   elm_table_homogeneous_set(table, EINA\_FALSE);

\end{DoxyCodeInclude}
 \item Where we add each rectangle to the table\+: 
\begin{DoxyCodeInclude}
   elm_table_pack(table, rect, 0, 0, 2, 1);
   elm_table_pack(table, rect, 0, 1, 1, 2);
   elm_table_pack(table, rect, 1, 1, 1, 1);
   elm_table_pack(table, rect, 1, 2, 1, 1);

\end{DoxyCodeInclude}
\end{DoxyItemize}
Here you can see the full source\+: 
\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -g table\_example\_02.c -o table\_example\_02 `pkg-config --cflags --libs elementary`}

\textcolor{preprocessor}{#include <Elementary.h>}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *rect, *table;

   elm_policy_set(ELM\_POLICY\_QUIT, ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"table"}, \textcolor{stringliteral}{"Table"});
   elm_win_autodel_set(win, EINA\_TRUE);

   table = elm_table_add(win);
   elm_win_resize_object_add(win, table);
   evas\_object\_show(table);
   elm_table_homogeneous_set(table, EINA\_FALSE);

   rect = evas\_object\_rectangle\_add(evas\_object\_evas\_get(win));
   evas\_object\_color\_set(rect, 255, 0, 0, 255);
   evas\_object\_size\_hint\_min\_set(rect, 100, 50);
   evas\_object\_show(rect);
   elm_table_pack(table, rect, 0, 0, 2, 1);

   rect = evas\_object\_rectangle\_add(evas\_object\_evas\_get(win));
   evas\_object\_color\_set(rect, 0, 255, 0, 255);
   evas\_object\_size\_hint\_min\_set(rect, 50, 100);
   evas\_object\_show(rect);
   elm_table_pack(table, rect, 0, 1, 1, 2);

   rect = evas\_object\_rectangle\_add(evas\_object\_evas\_get(win));
   evas\_object\_color\_set(rect, 0, 0, 255, 255);
   evas\_object\_size\_hint\_min\_set(rect, 50, 50);
   evas\_object\_show(rect);
   elm_table_pack(table, rect, 1, 1, 1, 1);

   rect = evas\_object\_rectangle\_add(evas\_object\_evas\_get(win));
   evas\_object\_color\_set(rect, 255, 255, 0, 255);
   evas\_object\_size\_hint\_min\_set(rect, 50, 50);
   evas\_object\_show(rect);
   elm_table_pack(table, rect, 1, 2, 1, 1);

   evas\_object\_show(win);

   elm_run();

   \textcolor{keywordflow}{return} 0;
\}
ELM_MAIN()
\end{DoxyCodeInclude}


Our example will look like this\+:

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