% % Chapter Basic % % Author: Erick Gallesio [eg@kaolin.unice.fr] % Creation date: 6-Jan-1993 12:31 % Last file update: 20-May-1995 13:13 \chapter{Basic widgets} This chapter is devoted to the simplest widgets of the {\stklos} package. In fact, all the Tk widgets, except the {\em canvas} and {\em text} widgets, are presented here. \section{Introduction} \subsection{A simple interface} \subsubsection{Defining the widgets} Before detailing all the simple widgets of the Tk library, we will see how to build the simple interface which is shown in Figure~\ref{fig-simple-interface}. \begin{figure} \centerline{\epsfig{file=Basic-Fig-1.ps}} \caption{A simple interface} \label{fig-simple-interface} \end{figure} This interface is composed of three main components: \begin{enumerate} \item a label which is situated at top \item a frame which is itself constituted of two components: \begin{enumerate} \item a listbox, and \item a scrollbar \end{enumerate} \item a ``quit'' button \end{enumerate} Let's have look now to the objects we'll have to create for this interface. First we can create the top label and the quit button which are relatively simple. This can be done with the following definitions: \begin{quote} \begin{verbatim} (define lab (make