Additional procedures The following procedures are available at any time after the first :frame procedure has been called procedure :path widget Given a widget name the full TK path name of the window created (or of the frame window created to hold a complex widget) is returned. e.g. :path MSG may return .app.panel.msg procedure :widget path Given a full TK path name the WIDGET name of the window created (or of the frame window created to hold a complex widget) is returned. e.g. :widget .app.panel.msg may return MSG procedure :show T|F If the value is True then the master window is made visible; if False then the master window is made non visible. It is normally necessary for a :show T procedure call to be made at the end of definition of the master window. The :show procedure also configures the footer width to the width of the frame and sets the keyboard focus to follow the mouse position. The procedure open-frame also causes the window to be made visible but does not define the keyboard focus. This is useful if an application for some reason requires a different keyboard focus algorithm. procedure :set item value Allows access to the internal constants used by the procedures. The constant held in the TCL global variable _item is set to value. Current constants and their default values are : listch (17); listcw (7); chkbtsize (24); chcesize (24); charh (25); charw (7); footercharw (6) The :set procedure can be used to redefine options to be used by the packer geometry manager for future widgets. layout default left anchor default nw expand default yes fill default both ipadx default 0 ipady default 0 padx default 0 pady default 0 footer-position default left procedure :enable widget events Allows additional events to be bound to a window. widget is either a widget name (it does not start with a period) or is a window name (it does start with a period).events are a list of TK events which are to be bound to the widget/window. e.g. :enable F1 Enter This causes an event to be generated when the mouse enters the window identified by F1. The TCL procedure click frame :Enter widget will be invoked. procedure :help widget text text defines information to be used for level 1 (task local) help for widget. For further information see the section on the Help System later in this document. procedure :colour mode window [option value] Defines the colour to be used for future widgets. mode can be either local (the colour selection applies only to this interpreter) or global (the colour selection will apply to the whole session). window is the window type and is one of: frame, label, entry, listbox, text, message, scale, scrollbar, button, checkbutton, menubutton, canvas. option is the window component and is one of: activebackground, activeforeground, background, disabledforeground, highlightbackground, highlightcolor, insertbackground, selectcolor, selectbackground, selectforeground, troughcolor. value is the colour to use for the selected item. Note - not all options are valid for all window types. procedure :font mode window weight [component value] Defines the font to be used for future widgets. window is the window type and is one of: label, entry, listbox, text, message, scale, button, checkbutton, menubutton, entry, menu. mode can be either local (the font selection applies only to this interpreter) or global (the font selection will apply to the whole session). weight is the font weight and is either b (bold) or n (medium) component is the window component and is one of: :fndry, :fmly, :wght, :pxlsz, :ptsz, :slant, :swdth, :rgstry. value is the value to use for the selected component. Default values: fndry=adobe; fmly=helvetica; pxlsz=12; ptsz=120; slant=r; swdth=normal; rgstry=iso8859. The following procedures are useful following a :panel procedure call to modify options used in the creation of widgets within the panel;. procedure :layout L|R|T|B|H|V The value supplied determines which side of the master should be used when packing slave windows into the master. Left, Right,Top and Bottom are layout options specific to the packer geometery manager and the geometry manager flag is set so that the packer is used for subsequent widgets within the current panel. Horizontal and Vertical are options which select the placer geometry manager and the geometry manager flag is set so that the placer is used for subsequent widgets within the current panel. arguments :pack T|F If the value is True then the value of the geometry manager flag is set so that the packer is used by default for subsequent widgets within the current panel; if the value is False then the value of the geometry manager flag is set so that the placer is used by default for subsequent widgets within the current panel. :place T|F If the value is True then the value of the geometry manager flag is set so that the placer is used by default for subsequent widgets within the current panel; if the value is False then the value of the geometry manager flag is set so that the packer is used by default for subsequent widgets within the current panel. :anchor where where should be a valid window point to be used when placing or packing slave windows within their master window. The parameter supplied is used by default for subsequent widgets within the current panel. Valid points are n,s,e,w,nw,ne,se,sw. procedure :row-gap value See the :row-gap argument of the :panel procedure. This procedure allows the current row gap to be changed. It also causes the geometry manager selected to be the placer. procedure :col-gap value See the :col-gap argument of the :panel procedure. This procedure allows the current column gap to be changed. It also causes the geometry manager selected to be the placer. procedure :next-row T Sets the current x position (used when placing widgets) to 0 and increments the y position (used when placing widgets) by the height of the last widget created plus any additional space specified by the row-gap parameter. It also causes the geometry manager selected to be the placer. procedure :next-col T Sets the current y position (used when placing widgets) to 0 and increments the x position (used when placing widgets) by the width of the last widget created plus any additional space specified by the col-gap parameter. It also causes the geometry manager selected to be the placer. procedure :hskip number number is a value in pixels to be added to the current x position (used when placing widgets). number may be positive in which case positioning skips to the right or it may be negative in which case positioning skips to the left. procedure :vskip number number is a value in pixels to be added to the current y position (used when placing widgets). number may be positive in which case positioning skips downwards or it may be negative in which case positioning skips upwards.