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

Re: st: More unpublicised dialog commands


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: More unpublicised dialog commands
Date   Thu, 26 Aug 2004 21:12:06 +0100

Thanks to James for this very helpful reply. And thanks again to all at StataCorp for arranging NASUG 2004 at Boston, and for inviting me over as a guest. It was a very enjoyable and educational trip.

Best wishes

Roger


At 20:24 26/08/2004, you wrote:

Roger Newson wrote:
>I now have another query about dialogs (which I also raised with Vince, who
>referred me to James). The official Stata dialog file -efunction.dlg-
>contains another unpublicised command, namely EXP, which appears to specify
>an expression button, which, if clicked on, causes an expression pallette
>to open, allowing the user to create (and graph) an expression by pointing
>and clicking. (Users can type -db efunction- to demonstrate this.) What is
>the syntax of the EXP command? And how many more unpublicised dialog
>commands are there?

EXP (expression control) takes the following options in addition to
the normal position arguments.

        label()
        error()
        default()
        option()
        buttonwidth()
        onchange()

Unless I am mistaken, the only undocumented controls available to the
dialog system are the expression builder (EXP) and the custom color
picker (COLOR).

I have inserted example code for the expression builder below.

**********
VERSION 8.0

POSITION . . 400 300

HELP hlp1, view("help someHelpFile")
RESET res1
OK ok1, label("OK")
CANCEL can1, label("Cancel")
SUBMIT submit1, label("Submit")

DIALOG main, label("Test dialog") tabtitle("Main")
BEGIN
        EXP  ex_name 10 10 300 .,                       ///
                label("Create")                         ///
                error("Error message here")             ///
                default(x < 10)                         ///
                option(my expression)                   ///
                buttonwidth(130)                        ///
                onchange(script my_script)
END

**********

-- James
[email protected]
*
*   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/

--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
  or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
*   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