.- help for ^winset^ [STB-46: dm63; STB-53: dm63.1] .- WinShow settings (Windows and Macintosh only) --------------------------------------------- ^winset^ [varlist] [, ^li^st ^do^] Description ----------- ^winset^ provides an easy way to display or set characteristics of the current dataset used by @winshow@ to customise the user interface. Without options ^winset^ presents a dialog box from which the user can choose one variable from the current dataset. The characteristics of this variable are then displayed in another window where they can be viewed or edited. The ^list^ option displays the current ^winshow^ settings for varlist in the main results window. Fields in dialog box -------------------- ^Variable label^ provides a description of the variable and is the text the user will see in the @winshow@ dialog box. ^Value labels^ define levels of a categorical variable. Warnings will be issued by @winshow@ if the user enters values not in this list. To delete a value label enter a blank string for that value, e.g. ^1 "Male" 2 "Female"^ changed to: ^1 "Male" 2 ""^ will delete the female value label ^Control type^ allows different controls to be used to display values of the current variable. A ^drop-down list^ may only be used with categorical variables. A ^check box^ may only be used with binary variables coded 0/1. ^Radio buttons^ may only be used with categorical variables with a maximum of four categories coded 1,2,3,4. The ^width^ of ^edit boxes^ and ^drop-down lists^ allows the user to over-ride the default width, in characters, @winshow@ allocates. The default length is either the length of the maximum value of the variable (for numeric) or the space allocated to a string variable (e.g. 12 for str12). You should increase this width for drop-down lists to make them readable. ^Must enter?^, if checked, does not allow the variable to be left blank (although missing is allowed). ^Missing values prohibited?^ is like a stricter version of ^Must enter?^ for numeric variables since neither blanks nor missing values (^.^) are allowed. Note that both these options are irrelevant for ^radio buttons^ and ^check^ ^boxes^ since by their nature missing or blank values cannot be entered. ^Cannot be edited?^ determines whether the user can edit the variable. If checked the ^control type^ becomes irrelevant. ^Valid range^ allows for range checking of numeric variables. Values outside this range prompt a warning. ^Never accept values outside range?^ strictly enforces the range if checked. Ranges for date variables may be entered in ^dmy^ format with year including the century. ^Default^ specifies the default value the variable is to take when a new observation is created. The default for date variables may be entered in ^dmy^ format with year including the century. Alternatively a special default value for date variables is allowed - ^todays date^. This allows observations to be date-stamped according to when they were entered. Changes made to characteristics by ^winset^ can be stored permanently by saving the dataset. Options ------- ^list^ displays on screen a listing of the current @winshow@ settings - useful for documenting the settings you have used. ^do^ displays on screen the commands you would have to issue in a @do@ file to create the current settings. Technical details ----------------- Programmers may prefer to set @winshow@ characteristics from a do file. Below is a list of the relevant characteristics. Note that defaults and ranges for date variables must be entered as elapsed dates. Char Value Description .- contype # Control type ^1^ = edit box ^2^ = drop-down list ^3^ = checkbox ^4^ = radio buttons default # or string Default value ^todays date^ can be used for date variables len # Length in characters of edit box or drop-down list noedit # Editing prohibited? ^1^ = yes otherwise (including not defined) = no nomiss # Missing values prohibited? ^1^ = yes otherwise = no range # # [strict] Valid range Range defined by [^#^,^#^] with option to strictly enforce req # Must enter? ^1^ = yes otherwise = no .- Examples -------- . ^char age[range] 15 65^ . ^char sex[req] 1^ . ^char sex[contype] 2^ . ^char entdate[default] todays date^ Author ------ Tony Brady Imperial College School of Medicine, U.K. t.brady@@ic.ac.uk Also see -------- STB: dm63 (STB-46) On-line: help for @char@, @window@, @winshow@