\hypertarget{embryo_set_text_8edc-example}{\section{embryo\-\_\-set\-\_\-text.\-edc}
}
This example shows how to set the text in T\-E\-X\-T part from embryo code.


\begin{DoxyCodeInclude}
collections \{
   group \{ name: \textcolor{stringliteral}{"main"};
      parts \{
         part \{ name: \textcolor{stringliteral}{"bg"};
            type: RECT;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               color: 255 255 255 255;
            \}
         \}
         part \{ name: \textcolor{stringliteral}{"label"};
            type: TEXT;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               color: 0 0 0 255;
               text \{
                  text: \textcolor{stringliteral}{"Click me."};
                  font: \textcolor{stringliteral}{"Sans"};
                  size: 12;
               \}
            \}
         \}
      \}
      programs \{
         program \{
            signal: \textcolor{stringliteral}{"mouse,down,1"};
            source: \textcolor{stringliteral}{"label"};
            script \{
               set\_text(PART:\textcolor{stringliteral}{"label"}, \textcolor{stringliteral}{"Clicked!"}); 
            \}
         \}
         program \{
            signal: \textcolor{stringliteral}{"mouse,up,1"};
            source: \textcolor{stringliteral}{"label"};
            script \{
               set\_text(PART:\textcolor{stringliteral}{"label"}, \textcolor{stringliteral}{"Click me."}); 
            \}
         \}
      \}
   \}
\}
\end{DoxyCodeInclude}
 