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

📄 dialog_programming.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 5 页
字号:
       LIST choices
           BEGIN
               Statistics
               Graphics
               Data management
           END
       . . . 
       DIALOG . . . 
           BEGIN
              . . .
              LISTBOX . . . , . . . contents(choices) . . .  
              . . . 
           END


{marker remarks3.6}{...}
{title:3.6 DIALOG}

{title:Syntax}

       {bind:{cmd:DIALOG} {it:newdialogname} {cmd:[,} {opt ti:tle}("{it:string}") {opt tab:title}("{it:string}"){cmd:]}}
           BEGIN
               {{it:control definition statements}|{cmd:INCLUDE}|{cmd:DEFINE}}
               . . .
           END


{title:Description}

{pstd}
{hi:DIALOG} defines a dialog.  Every {cmd:.dlg} file must define at least one
dialog.  Only control definition statements, {hi:INCLUDE}, and {hi:DEFINE}
are allowed between {hi:BEGIN} and {hi:END}.


{title:Options}

{phang}
{opt title}{cmd:("}{it:string}{cmd:")} defines the text to be displayed in the
dialog's title bar.

{phang}
{opt tabtitle}{cmd:("}{it:string}{cmd:")} defines the text to be displayed on
the dialog's tab.  Dialogs are tabbed if more than one dialog is defined.
When a user clicks on the tab, the dialog becomes visible and active.  If only
one dialog is specified, the contents of {opt tabtitle()} are irrelevant.


{marker remarks3.6.1}{...}
{title:3.6.1 CHECKBOX on/off input control}

{title:Syntax}

{p 8 12 2}
{hi:CHECKBOX} {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 default(defnumval)} {opt nomem:ory} 
         {cmd:groupbox} {opt onclickon(iaction)} 
         {opt onclickoff(iaction)} {opt op:tion(optionname)}{cmd:]}
 

{title:Member functions}

{p2colset 5 27 29 2}{...}
{p2col :{cmd:setlabel} {it:string}}sets text to string{p_end}
{p2col :{cmd:setoff}}unchecks checkbox{p_end}
{p2col :{cmd:seton}}checks checkbox{p_end}
{p2colreset}{...}

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


{title:Returned values for use in PROGRAM}

{pstd}	
Returns numeric, 0 or 1, depending on whether the box is checked.


{title:Description}

{pstd}
{hi:CHECKBOX} defines a checkbox control.  A checkbox control is used to
indicate an option that is either on or off.


{title:Options}

{phang}
{opt label}{cmd:("}{it:string}{cmd:")} specifies the text to be displayed next
to the control.  You should specify text that clearly implies two opposite
states so that it is obvious what happens when the checkbox is checked or
unchecked.

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

{phang}
{opt default(defnumval)} specifies whether the box is to start as checked or
unchecked; it will be unchecked if {it:defnumval} evaluates to 0, and it will
be checked otherwise.  If {opt default()} is not specified, {cmd:default(0)}
is assumed.

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

{phang}
{opt groupbox} makes this checkbox control also a group box into which other
controls can be placed to emphasize that they are related.  For instance, if
this control were such that, if it were checked, three other related
checkboxes ought to be enabled so that they could be checked or not, it is
considered good style to have a group box around them.  The group box is just
an outline; it does not cause the controls "inside" to be disabled or hidden
or in any other way act differently than they would if they were outside the
group box.  On some platforms, radio buttons have precedence over checkbox
group boxes.  You may place radio buttons within a checkbox group box, but do
not place a checkbox group box within a group of radio buttons.  If you do,
you may not be able to click on the checkbox control on some platforms.

{phang}
{opt onclickon(iaction)} and {opt onclickoff(iaction)} specify the i-actions
to be invoked when the checkbox is clicked on or off.  This could be used, for
instance, to hide, show, disable, or enable other input controls.  The default
i-action is to do nothing.  Note that the {opt onclickon()} or 
{opt onclickoff()} i-action will be invoked the first time the checkbox is
displayed.

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


{title:Example}

{psee}{cmd:CHECKBOX robust 10 10 100 ., label(Robust VCE)}{p_end}


{marker remarks3.6.2}{...}
{title:3.6.2 RADIO on/off input control}

{title:Syntax}

{p 8 15 2}
{cmd:RADIO} {it:newcontrolname} {it:x} {it:y} {it:xsize} {it:ysize} 
{cmd:[,} {cmd:[}{opt f:irst}|{opt m:iddle}|{opt la:st}{cmd:]} 
                {opt l:abel}{cmd:("}{it:string}{cmd:")} 
                {opt e:rror}{cmd:("}{it:string}{cmd:")} {opt default(defnumval)}
                {opt nomem:ory} {opt onclickon(iaction)} {opt onclickoff(iaction)}
                {opt op:tion(optionname)}{cmd:]}


{title:Member functions}

{p2colset 5 27 29 2}{...}
{p2col :{cmd:setlabel} {it:string}}sets text to string{p_end}
{p2col :{cmd:seton}}checks the radio button and unchecks any other buttons
in the group{p_end}
{p2colreset}{...}

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


{title:Returned values for use in PROGRAM}

{pstd}
Returns numeric, 0 or 1, depending on whether the button is checked.


{title:Description}

{pstd}
{hi:RADIO} defines a radio button control in a radio-button group.  Radio
buttons are used in groups of two or more to select mutually exclusive, but
related, choices when the number of choices is small.  Selecting one radio
button automatically unselects the others in its group.


{title:Options}

{phang}
{opt first}, {opt middle}, and {opt last} specify whether this radio button is
the first, a middle, or the last member of a group.  There must be one 
{opt first} and one {opt last}.  There can be zero or more {opt middle}
members.  {opt middle} is the default if no option is specified.

{phang}
{opt label}{cmd:("}{it:string}{cmd:")} specifies the text to be displayed next
to the control.

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

{phang}
{opt default(defnumval)} specifies whether the radio button is to start as
selected or unselected; it will be unselected if {it:defnumval} evaluates to 0
and will be selected otherwise.  If {opt default()} is not specified, 
{cmd:default(0)} is assumed unless {opt first} is also specified, in which
case, {cmd:default(1)} is assumed.  It is considered bad style to have
anything other than the first button be the default, so this option is rarely
specified.

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

{phang}
{opt onclickon(iaction)} and {opt onclickoff(iaction)} specify that i-action
be invoked when the radio button is clicked on or clicked off.  This could be
used, for instance, to hide, show, disable, or enable other input controls.
The default i-action is to do nothing.  Note that the {opt onclickon()}
i-action will be invoked the first time the radio button is displayed if it is
selected.

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


{title:Example}

    {hi:RADIO} {cmd: r1 10  10 100 ., first  label("First choice")}
    {hi:RADIO} {cmd: r2  @ +20   @ ., middle label("Second choice")}
    {hi:RADIO} {cmd: r3  @ +20   @ ., middle label("Third choice")}
    {hi:RADIO} {cmd: r4  @ +20   @ ., last   label("Last choice")}


{marker remarks3.6.3}{...}
{title:3.6.3 SPINNER numeric input control} 

{title:Syntax}

{p 8 17 2}
{cmd:SPINNER} {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 default(defnumval)} {opt nomem:ory} {opt min(defnumval)}
        {opt max(defnumval)} {opt onchange(iaction)}
        {opt op:tion(optionname)}{cmd:]}


{title:Member functions}

{p2colset 5 22 24 2}{...}
{p2col :{cmd:setvalue} {it:#}}sets the spinner to {it:#}{p_end}
{p2colreset}{...}

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


{title:Returned values for use in PROGRAM}

{pstd}
Returns numeric, the value of the spinner.


{title:Description}

{pstd}
{hi:SPINNER} defines a spinner.  A spinner displays an edit field that accepts
an integer number, which the user may either increment or decrement by
clicking up/down arrows.


{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 spinner.  If you want
to label the spinner, you must use a {hi:TEXT} static control.

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

{phang}
{opt default(defnumval)} specifies the initial integer value of the spinner.
If not specified, {opt min()} is assumed, and, if that is not specified, 0 is
assumed.

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

{phang}
{opt min(defnumval)} and {opt max(defnumval)} set the minimum and maximum
integer values of the spinner.  {cmd:min(0)} and {cmd:max(100)} are the
defaults.

{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}}smartly inserts {it:string} at the
        current cursor position in the edit field.  A {opt smartinsert}
        ensures that the inserted text will have leading and trailing spaces
        around it.{p_end} 
{p2colreset}{...}

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


{title:Returned values for use in PROGRAM}

{pstd}

⌨️ 快捷键说明

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