Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: dialog box programming


From   "Tim Hofer" <[email protected]>
To   <[email protected]>
Subject   st: Re: dialog box programming
Date   Fri, 2 May 2003 12:34:17 -0400

Well I'll answer my own question 2/ because
maybe one person in the world will be frustrated
by  the same problem.

while you can write
put "groups("options.q1_r1
no space between the string and the control value

you can *not* write [nothing happens when you click "OK"]
put "groups("options.q1_r1" "options.q1_r2")"
with no space before the second set of quotes.


put "groups(" options.q1_r1 " " options.q1_r2  ")"

allows you to build up the options on one line.

----- Original Message -----
From: "Tim Hofer" <[email protected]>
To: <[email protected]>
Sent: Friday, May 02, 2003 12:20 PM
Subject: st: dialog box programming


> I may be asking too much of the dialog box commands but:
>
> I would like to present the user with 6 boxes/spinners and ask them to
> put in the proportion of cases falling into each of 6 groups.
>
> obviously the contents have to add to 100
>
> 1/ Is there some way to do mathematical operations on the input controls
and
> check that they add to 100 as part of some iaction?
>
> or better yet have the 6th box (not set by the user) change to reflect
> changes in the other 5?
> (It seemed like this might be possible via the spinner onchange(iaction)
but
> I got stuck).
>
> 2/ the results have to be presented to a program as an option.
> the optionarg command says that it is an easy way to add
> single argument options.
> What about multiple argument options?
> e.g. I want:   groups(10 30 30 10 10 10)
> if I give each SPINNER control the option name "groups"
> then I get separate options group(10) group(30) etc  using
> the optionarg command
> I can build it up w. 6 put commands but that seems cumbersome
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index