procedure :optionbutton name Creates an optionbutton widget within the current panel frame for the TCL interpreter. An optionbutton widget is a button window. A list of options is associated with the widget and the currently selected option is displayed within the button window. Items from the option list are selected cyclically using the mouse. name is used to generate the path name of the window to be created. It should have the format of a widget name (e.g. :optionbutton OPT) and should be unique within this interpreter. The name will be lower-cased (using the string tolower command) in order to generate the path name used to create the window. When the button is selected using the mouse then ,if available, the TCL script supplied using the :command parameter will be executed. If this is not available the TCL command click FRAME “ ” OPTIONBUTTON index option will be executed where FRAME and OPTIONBUTTON are widget names, index is the index (from zero) into the option list of the current option and option is the current option. The path name generated has the form framename.panelname.buttonname. The :optionbutton procedure may also be used directly within a frame window (i.e. before any panel window has been created). The :optionbutton procedure may have a number of arguments however none of these is mandatory. arguments :x number number is the x-co-ordinate within the current panel of the optionbutton widget in pixels e.g. :x 400 :y number number is the y-co-ordinate within the current panel of the optionbutton widget in pixels e.g. :y 200 The :x and :y parameters may be omitted in which case the packer geometry manager will be used and the position of the window will be determined by the contents of the master (panel) window. If however the :x and :y parameters are supplied then the placer geometry manager will be used to position the window within the master (panel) window. Warning: Note that it is not possible to mix use of the packer and placer geometry managers within the same window. Thus all windows within a panel must request or imply that the same geometry manager is used. :w number number is the width of the optionbutton window in characters. e.g. :w 20 :h number number is the height of the optionbutton window in lines of text. e.g. :h 2 The :w and/or :h parameters may be omitted in which case the size of the optionbutton will be determined by its contents. If however the :w and :h parameters are supplied then these will be used to configure the button window. Normally :h will not be supplied. :value value value is the index of the default option item within the option list. The default value is 0. :strings list list is a simple TCL list of text strings which form the elements of the option list. The default is a null list and hence an empty option list. :menu is an alias for :strings. :command string string is any TCL command or commands to be executed when an event is generated. If a command is supplied and executed in this manner then the click procedure is not invoked See also common procedure arguments defined later in this document.