summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pdf-forms-tutorial-en/forms-src/fde0016.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pdf-forms-tutorial-en/forms-src/fde0016.tex')
-rw-r--r--Master/texmf-dist/doc/latex/pdf-forms-tutorial-en/forms-src/fde0016.tex27
1 files changed, 27 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pdf-forms-tutorial-en/forms-src/fde0016.tex b/Master/texmf-dist/doc/latex/pdf-forms-tutorial-en/forms-src/fde0016.tex
new file mode 100644
index 00000000000..03b55135859
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pdf-forms-tutorial-en/forms-src/fde0016.tex
@@ -0,0 +1,27 @@
+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}