⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialog_programming.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 5 页
字号:
{phang}
{opt onchange(iaction)} specifies the i-action to be invoked when the spinner
is changed.  The default i-action is to do nothing.  Note that the 
{opt onchange()} i-action will be invoked the first time the spinner is
displayed.

{phang}
{opt option(optionname)} is a communication option that associates
{it:optionname} with the value of the spinner.


{title:Example}

{psee}{cmd:SPINNER level 10 10 60 ., label(Sig. level) min(5) max(100)} ///{break}
{cmd:default(c(level)) option(level)}{p_end}


{marker remarks3.6.4}{...}
{title:3.6.4 EDIT string input control}

{title:Syntax}

{p 8 14 2} 
EDIT {it:newcontrolname} {it:x} {it:y} {it:xsize} {it:ysize} 
     [{cmd:,} {opt l:abel}("{it:string}") {opt e:rror}("{it:string}")
     {opt default(defstrval)} {opt nomem:ory} {opt max(#)} 
     {cmd: numonly password} {opt onchange(iaction)} {opt onclick(iaction)}
     {opt op:tion(optionname)}]


{title:Member functions}

{p2colset 5 30 32 2}{...}
{p2col :{cmd:setlabel} {it:string}}sets the label for the edit field{p_end}
{p2col :{cmd:setvalue} {it:string}}sets the value shown in the edit field{p_end}
{p2col :{cmd:append} {it:string}}appends {it:string} to the value in the edit field{p_end}
{p2col :{cmd:prepend} {it:string}}prepends {it:string} to the value of the edit field{p_end}
{p2col :{cmd:insert} {it:string}}inserts {it:string} at the current cursor position of the edit field{p_end}
{p2col :{cmd:smartinsert} {it:string}}inserts {it:string} at the
        current cursor position in the edit field with leading and 
        trailing spaces around it.{p_end}
{p2col :{cmd:setdefault} {it:string}}sets the default value for the edit field.
This does not change what is displayed in the edit field.{p_end}
{p2col :{cmd:setfocus}}causes the control to obtain keyboard focus{p_end}
{p2colreset}{...}

{pstd}
The standard member functions {opt hide}, {opt show}, {opt disable},
{opt enable}, and {opt setposition} are also provided.


{title:Returned values for use in PROGRAM}

{pstd}
Returns string, the contents of the edit field.


{title:Description}

{pstd}
{hi:EDIT} defines an edit field.  An edit field is a box into which the 
user may enter and edit text; the width of the box does not limit how much
text can be entered.


{title:Options}

{phang}
{opt label}{cmd:("}{it:string}{cmd:")} specifies a description for the
control, but it does not display the label next to the edit field.  If you
want to label the edit field, you must use a {hi:TEXT} static control.

{phang}
{opt error}{cmd:("}{it:string}{cmd:")} specifies the text to be displayed
describing this field to the user in automatically generated error boxes.

{phang}
{opt default(defstrval)} specifies the default contents of the edit field.  If
not specified, {opt default("")} is assumed.  When there is default text, the
current cursor position will be at the end of the text.

{phang}
{opt nomemory} specifies that the edit field is not to remember how it was
filled in between invocations.

{phang}
{opt max(#)} specifies the maximum number of characters that may be entered
into the edit field.

{phang}
{opt numonly} specifies that the edit field only be able to contain period,
numeric characters 0 through 9, and {cmd:-} (minus).

{phang}
{opt password} specifies that the characters entered into the edit field be
shown on the screen as asterisks or bullets, depending on the operating
system.

{phang}
{opt onchange(iaction)} specifies the i-action to be invoked when the contents
of the edit field are changed.  The default i-action is to do nothing.  Note
that the {opt onchange()} i-action will be invoked the first time the edit field
is displayed.

{phang}
{opt onclick(iaction)} specifies the i-action to be invoked when the user
clicks in the edit field.

{phang}
{opt option(optionname)} is a communication option that associates
{it:optionname} with the contents of the edit field.


{title:Example}

   {hi:TEXT} {cmd:tlab   10  10 200   ., label("Title")}
   {hi:EDIT} {cmd:title   @ +20   @   ., label("title")}


{marker remarks3.6.5}
{title:3.6.5 VARLIST and VARNAME string input controls}

{title:Syntax}

{p 8 19 2} 
{{hi:VARLIST}|{hi:VARNAME}} {it:newcontrolname} 
    {it:x} {it:y} {it:xsize} {it:ysize} {cmd:[,}
    {opt l:abel}("{it:string}") {opt e:rror}("{it:string}")
    {opt default(defstrval)} {opt nomem:ory} {cmd:allowcat allowts}
    {opt op:tion(optionname)}]{p_end}


{title:Member functions}

{p2colset 5 30 32 2}{...}
{p2col :{opt setlabel} {it:string}}sets the label for the varlist edit
field{p_end}
{p2col :{opt setvalue} {it:string}}sets the value shown in the varlist edit field{p_end}
{p2col :{opt append} {it:string}}appends {it:string} to the value in the varlist edit field{p_end}
{p2col :{opt prepend} {it:string}}prepends {it:string} to the value of the varlist edit field{p_end}
{p2col :{opt insert} {it:string}}inserts {it:string} at the current cursor position of the varlist edit field{p_end}
{p2col :{opt smartinsert} {it:string}}inserts {it:string} at the
current cursor position in the varlist edit field with leading and trailing 
spaces around it.{p_end}
{p2col :{cmd:setfocus}}causes the control to obtain keyboard focus{p_end}
{p2colreset}{...}

{pstd}
The standard member functions {opt hide}, {opt show}, {opt disable}, 
{opt enable}, and {opt setposition} are also provided.


{title:Returned values for use in PROGRAM}

{pstd}
Returns {it:string}, the contents of the varlist edit field.


{title:Description}

{pstd}
{hi:VARLIST} and {hi:VARNAME} are special cases of an edit field.
{hi:VARLIST} provides an edit field into which one or more Stata variable
names may be entered (along with standard Stata varlist abbreviations), and
{hi:VARNAME} provides an edit field into which one Stata variable name may be
entered (with standard Stata varname abbreviations allowed). Under Windows and
Macintosh {hi:VARLIST} and {hi:VARNAME} controls are presented as a combobox
so that variables may be selected from a list.


{title:Options}

{phang}
{opt label}{cmd:("}{it:string}"{cmd:)} specifies a description for the control
but does not display the label next to the varlist edit field.  If you want to
label the control, you must use a {hi:TEXT} static control.

{phang}
{opt error}{cmd:("}{it:string}"{cmd:)} specifies the text to be displayed
describing this field to the user in automatically generated error boxes.

{phang}
{opt default(defstrval)} specifies the default contents of the edit field.  If
not specified, {opt default("")} is assumed.

{phang}
{opt nomemory} specifies that the edit field not remember how it was filled in
between invocations.

{phang}
{opt allowcat} specifies that the control allow {opt xi}-style
categorical/interaction terms; see {helpb xi}.

{phang}
{opt allowts} specifies that the control allow time-series operators; see
{helpb tsvarlist}.

{phang}
{opt option(optionname)} is a communication option that associates
{it:optionname} with the contents of the edit field.


{title:Example}

    {hi:TEXT}     {cmd:dvlab     10  10 200   ., label("Dependent variable")}
    {hi:VARNAME}  {cmd:depvar     @ +20   @   ., label("dep. var")}
    {hi:TEXT}     {cmd:ivlab      @ +30   @   ., label("Independent variables")}
    {hi:VARLIST}  {cmd:idepvars   @ +20   @   ., label("ind. vars.")}


{marker remarks3.6.6}{...}
{title:3.6.6 FILE string input control}

{title:Syntax}

{p 8 16 2}
{cmd:FILE} {it:newcontrolname} {it:x} {it:y} {it:xsize} {it:ysize}
    {cmd:[,} {opt l:abel}("{it:string}") {opt e:rror}("{it:string}")
    {opt default(defstrval)} {opt nomem:ory} {opt buttonw:idth(#)}
    {opt dialogti:tle(string)} {cmd:save} {opt filter(string)}
    {opt onchange(iaction)} {opt op:tion(optionname)}{cmd:]}


{title:Member functions}

{p2colset 5 30 32 2}{...}
{p2col :{opt setlabel} {it:string}} sets the label shown on the edit button{p_end}
{p2col :{opt setvalue} {it:string}} sets the value shown in the edit field{p_end}
{p2col :{opt append} {it:string}} appends {it:string} to the value in the edit field{p_end}
{p2col :{opt prepend} {it:string}} prepends {it:string} to the value of the edit field{p_end}
{p2col :{opt insert} {it:string}} inserts {it:string} at the current cursor position of the edit field{p_end}
{p2col :{opt smartinsert} {it:string}} inserts {it:string} at the
current cursor position in the edit field with leading and trailing spaces around it.{p_end}
{p2colreset}{...}

{pstd}
The standard member functions {opt hide}, {opt show}, {opt disable}, 
{opt enable}, and {opt setposition} are also provided.


{title:Returned values for use in PROGRAM}

{pstd}
Returns string, the contents of the edit field (the file chosen).


{title:Description}

{pstd}
{hi:FILE} is a special edit field with a button on the right for selecting a
filename.  When the user clicks on the button, a file dialog is displayed.  If
the user selects a filename and clicks {hi:OK}, that filename is put into the
edit field.  The user may alternatively type a filename into the edit field.


{title:Options}

{phang}
{opt label}{cmd:("}{it:string}{cmd:")} specifies the text to appear on the button.  The
default is {bind:{cmd:("Browse . . .")}}.

{phang}
{opt error}{cmd:("}{it:string}{cmd:")} specifies the text to be displayed
describing this field to the user in automatically generated error boxes.

{phang}
{opt default(defstrval)} specifies the default contents of the edit
field.  If not specified, {opt default("")} is assumed.

{phang}
{opt nomemory} specifies that the edit field not remember how it was filled in
between invocations.

{phang}
{opt buttonwidth(#)} specifies the width in pixels of the button.  The default
is {cmd:buttonwidth(80)}.  The overall size specified in {it:xsize} includes
the button.

{phang}
{opt dialogtitle(string)} is the title to show on the file dialog when you
click on the file button.

{phang}
{opt save} specifies that the file dialog allow the user to choose a filename
for saving rather than one for opening.

{phang}
{opt filter} consists of pairs of descriptions and wildcard file selection
strings separated by "{opt |}", such as

{pmore}
{cmd:filter("Stata Graphs|*.gph|All Files|*.*")}

{phang}
{opt onchange(iaction)} specifies an i-action to be invoked when the user
changes the chosen file.  The default i-action is to do nothing.  Note that
the {opt onchange()} i-action will be invoked the first time the file chooser
is displayed.

{phang}
{opt option(optionname)} is a communication option that associates
{it:optionname} with the contents of the edit field.


{title:Example}

{psee}{cmd:FILE fname 10 10 300 ., error("Filename to open") label("Browse . . .")}{p_end}


{marker remarks3.6.7}{...}
{title:3.6.7 LISTBOX list input control}

{title:Syntax}

{p 8 19 2}
{cmd:LISTBOX} {it:newcontrolname} {it:x} {it:y} {it:xsize} {it:ysize}
{cmd:[,}
    {opt l:abel}{cmd:("}{it:string}{cmd:")} {opt e:rror}{cmd:("}{it:string}{cmd:")}
    {opt nomem:ory} {opt cont:ents(conspec)} {opt val:ues(listname)}
    {opt default(defstrval)}
    {opt ondblclick(iaction)}
    {cmd:[}{opt onselchange(iaction)}|{opt onselchangelist(listname)}{cmd:]}
    {opt op:tion(optionname)}{cmd:]}


{title:Member functions}

{p2colset 8 26 28 2}{...}
{p2col :{opt setlabel} {it:string}}sets the label for the list box{p_end}
{p2col :{opt setvalue} {it:string}}sets the currently selected item{p_end}
{p2col :{cmd:setfocus}}causes the control to obtain keyboard focus{p_end}
{p2colreset}{...}

{pstd}
The standard member functions {opt hide}, {opt show}, {opt disable},
{opt enable}, and {opt setposition} are also provided.


{title:Returned values for use in PROGRAM}

{pstd}
Returns {it:string}, the text of the item chosen, or, if {opt values(listname)} is
specified, the text from the corresponding element of {it:listname}.


{title:Description}

{pstd}
{hi:LISTBOX} defines a list box con

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -