Description Usage Arguments Details Value Note Author(s) See Also Examples
These functions are wrappers around the tkmessageBox() method, in the style of TkInter.
1 2 3 4 5 6 7 |
title |
character string specifying title for dialog window |
message |
character string specifying message displayed inside the alert |
... |
extra arguments for |
All methods above display a modal message dialog to allow the user to provide input. The application will wait until the user responds.
A list of other arguments is shown here:
character string specifying the default button of the dialog
character string specifying a secondary message, usually displayed in a smaller font under the main message
object of the class tkwin
representing the window
of the application for which this dialog is being posted.
character string specifying predefined set of buttons to
be displayed (askquestion
only). Possible values are:
displays three buttons whose symbolic names are abort, retry and ignore
displays one button whose symbolic name is ok
displays two buttons whose symbolic names are ok and cancel
displays two buttons whose symbolic names are retry and cancel
displays two buttons whose symbolic names are yes and no
displays three buttons whose symbolic names are yes, no and cancel
The askquestion
method returns character string of the button's
symbolic name corresponding to the user response.
The askokcancel
method returns TRUE
if user responds OK.
The askyesno
method returns TRUE
if user responds YES.
The askretrycancel
method returns TRUE
if user responds
RETRY.
Other methods are invoked for their side-effect.
The parent
argument controls display location. If specified, the
dialog will be centered over the parent widget; otherwise, center screen.
P. Roebuck proebuck@mdanderson.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
## Display informational dialog
showinfo('Gumptions', 'Stupid is as stupid does.')
## Ask a question (string response)
button <- askquestion("Proceed?",
"Destroy Western Civilization?",
detail="It's going down the tubes anyway...",
type="yesnocancel",
default="cancel")
## Ask a question (logical response)
toplevel <- tktoplevel()
if (askyesno('Install',
'Are you sure you want to install SuperVirus?',
default="no",
parent=toplevel)) {
cat("yes", "\n")
} else {
cat("no", "\n")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.