Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modalDialog

Modal dialog window for returning a text string


Description

Ask for a text string in a pop up window.

Usage

modalDialog(title, question, entryInit, top = NULL, entryWidth = 20, 
            returnValOnCancel = "ID_CANCEL", do.grab = FALSE)

Arguments

title

Text string for the title bar of the appering window.

question

Text string for the question.

entryInit

Default value of answer.

top

Text string for the TclTk top.

entryWidth

Integer for the entryWidth.

returnValOnCancel

Text string for the returned value on Cancel.

do.grab

Logical. tkgrab.set resulted in fail for some systems.

Value

The text string entered, or returnValOnCancel.

Author(s)

From the examples compiled by James Wettenhall.

References

Examples

Menus <- 
 list(MainUser = 
      list(label = "Test of user drag down menu - Position of \"vertices\"",
           command = function(object, ...) 
             print(Positions(list(...)$Arguments$vertexList))),
      MainUser = 
      list(label = "Test of user drag down menu - modalDialog",
           command = function(object, ...) {
             Args <- list(...)$Arguments
             ReturnVal <- modalDialog("Test modalDialog Entry", "Enter name",
                                      Args$control$title, 
                                      graphWindow = Args$graphWindow)
             print(ReturnVal)
             if (ReturnVal == "ID_CANCEL")
               return() } )
     )

dynamicGraph

dynamicGraph

v0.2.2.6
GPL (>= 2)
Authors
Jens Henrik Badsberg <coco@badsberg.eu>
Initial release
2010/01/30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.