<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">The choice lists can be initialized using JavaScript instead
of writing the choices in the \textit{\textbackslash{}ChoiceMenu[]\{\}\{\}}
macro.\\
This provides a better overview.

Choices are specified in an array. Each array element is an array again,
consisting of two entries: the full text shown on screen and an
abbreviation:
\begin{lstlisting}
var softwareAuswahl = [
  [ "", ""],
  [ "Betriebssystem", "os" ],
  [ "Textverarbeitung", "tp" ],
  [ "Tabellenkalkulation", "sc" ],
  [ "Präsentationsprogramm", "pp" ],
  [ "E-Mail-Client", "mc" ],
  [ "Web browser", "wb" ],
  [ "Mathematik-Software", "ms" ],
  [ "PDF-Anzeigeprogramm", "pv" ]
];
\end{lstlisting}
The \textit{setItems()\/} method sets the choices for
a choice list:
\begin{lstlisting}
this.getField("sw01").setItems(softwareAuswahl);
\end{lstlisting}
\lstinputlisting{../examples/ex0101.tex}
</pre></body></html>