gconfirm: Confirmation dialog

Description Usage Arguments Value Examples

View source: R/gdialogs.R

Description

Calls handler when Yes button is clicked. Unlike other gWidgets implementations, this one does not block the R process before returning a logical indicating the selection. One must use a handler to have interactivity.

Usage

1
2
gconfirm(message, title = "Confirm", icon = NULL, parent = NULL,
  handler = NULL, action = NULL, ...)

Arguments

message

message

title

title for dialog's window

icon

icon. One of 'info', 'warning', 'error', or 'question'.

parent

parent container (main window instance)

handler

handler passed to dialog if confirmed

action

passed to any handler

...

ignored

Value

return value ignored, use handler for response.

Examples

1
2
3
4
5
6
w <- gwindow()
gbutton("click me for a message", cont=w, handler=function(h,...) {
gconfirm("Do you like R", parent=w, handler=function(h,...) {
galert("Glad you do", parent=w)
})
})

jverzani/gWidgetsWWW2 documentation built on Feb. 9, 2020, 5:18 p.m.