procedure :slider name Creates a slider widget within the current panel frame for the TCL interpreter. A slider widget is a frame window containing three label windows, an entry window and a scale window. name is used to generate the path name of the windows to be created. It should have the format of a widget name (e.g. :slider GG) 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 windows. When an event is generated either by pressing the Return key after entering a value in the entry window or by releasing mouse button 1 while the mouse focus is on the slider window then ,if available, the TCL script supplied using the :command parameter will be executed. If this is not available the TCL command click FRAME “” “” SLIDER value will be executed where FRAME and SLIDER are widget names and value is the current value of the slider widget scale. The path names generated have the root framename.panelname.slidername and the items label, entry, min, max and scale. The :slider procedure may also be used directly within a frame window (i.e. before any panel window has been created). Normally it is necessary when typing information into the entry window to press the return key in order to generate an event and cause the procedure linked to the entry to be executed. Often users fail to do this and so a binding is made to the mouse focus and the contents of the entry window are checked whenever the mouse focus leaves the entry window. If information is found to have been typed into the entry window which has not been seen by a return key event then an action is taken as is the return key had been pressed. The :slider 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 slider widget in pixels e.g. :x 400 :y number number is the y-co-ordinate within the current panel of the slider 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 slider widget in pixels. e.g. :w 200 The default action is to allow the geometry manager to determine the size of the widget. :h number number is the height of the slider widget in pixels. e.g. :h 24 The default value is 1 character height. :value value value is the initial value of the slider widget scale and determines the position of the divider. The default value is 0. :min value value is the minimum value of the slider widget scale. :max value value is the maximum value of the slider widget scale. :valuex value value is the position of the right hand edge of the label window with relation to the left hand edge of the slider widget. It is thus the space available to write the label string which is right justified within the label window. The value may be expressed in units of pixels of characters. e.g. :valuex 100 (pixels); :valuex 15c (characters) :label string string is a text string to be written into the label component of the slider widget. The default is the name of the slider widget. :ticks T|F If the option T is selected then numerical tick marks are displayed below or to the left of the slider. The default is F - no tick marks are displayed. :layout H|V If the option V is selected then the slider widget is displayed in a vertical orientation otherwise it is displayed in a horizontal orientation. The default is that the widget is displayed horizontally. :scale-length value value is the desired long dimension of the scale in pixels. The default value is 100. :scale-width value value is the desired narrow dimension of the scale in pixels. The default value is 15. :slider-width value value is the desired size of the slider in pixels. The default value is 10. :limit-width value value is the desired width of the labels (in characters) drawn at the ends of the slider scale. The default is that the label widths are determined by the text strings written in them. :entry-width value value is the desired width of the entry widget in pixels. The default width is 6 pixels. :resolution value value is the desired resolution of the scale window in units per step. By default the resolution is calculated by {absolute value of (max - min)) / (steps) :steps value value is the desired number of steps in the scale window. The default value of step is 256. This parameter is ignored unless :resolution is also supplied. :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.