dlg_message: A Tcl/Tk version of the svDialogs message box

dlg_message.tcltkGUIR Documentation

A Tcl/Tk version of the svDialogs message box

Description

A Tcl/Tk version of the svDialogs message box

Usage

## S3 method for class 'tcltkGUI'
dlg_message(
  message,
  type = c("ok", "okcancel", "yesno", "yesnocancel"),
  ...,
  gui = .GUI
)

Arguments

message

The message to display in the dialog box.

type

The type of dialog box: 'ok', 'okcancel', 'yesno' or 'yesnocancel'.

...

Not used yet.

gui

The 'gui' object concerned by this dialog box.

Value

The button pressed by the user.

See Also

svDialogs::dlg_message()

Examples

library(svDialogstcltk) # Tcl/Tk dialog boxes are now used by default
## Not run: 
# A simple information box
dlg_message("Hello world!")$res

# Ask to continue
dlg_message(c("This is a long task!", "Continue?"), "okcancel")$res

# Ask a question
dlg_message("Do you like apples?", "yesno")$res

# Idem, but one can interrupt too
res <- dlg_message("Do you like oranges?", "yesnocancel")$res
if (res == "cancel")
  cat("Ah, ah! You refuse to answer!\n")

## End(Not run)

SciViews/svDialogstcltk documentation built on May 12, 2022, 2:47 a.m.