TkWidgets               package:tcltk               R Documentation

_T_k _w_i_d_g_e_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Create Tk widgets and associated R objects.

_U_s_a_g_e:

     tkwidget(parent, type, ...)

     tkbutton(parent, ...)
     tkcanvas(parent, ...)
     tkcheckbutton(parent, ...)
     tkentry(parent, ...)
     ttkentry(parent, ...)
     tkframe(parent, ...)
     tklabel(parent, ...)
     tklistbox(parent, ...)
     tkmenu(parent, ...)
     tkmenubutton(parent, ...)
     tkmessage(parent, ...)
     tkradiobutton(parent, ...)
     tkscale(parent, ...)
     tkscrollbar(parent, ...)
     tktext(parent, ...)
     tktoplevel(parent = .TkRoot, ...)

     ttkbutton(parent, ...)
     ttkcheckbutton(parent, ...)
     ttkcombobox(parent, ...)
     ttkframe(parent, ...)
     ttkimage(parent, ...)
     ttklabel(parent, ...)
     ttklabelframe(parent, ...)
     ttkmenubutton(parent, ...)
     ttknotebook(parent, ...)
     ttkpanedwindow(parent, ...)
     ttkprogressbar(parent, ...)
     ttkradiobutton(parent, ...)
     ttkscrollbar(parent, ...)
     ttkseparator(parent, ...)
     ttksizegrip(parent, ...)
     ttktreeview(parent, ...)

_A_r_g_u_m_e_n_t_s:

  parent: Parent of widget window.

    type: string describing the type of widget desired.

     ...: handled via '.Tcl.args'.

_D_e_t_a_i_l_s:

     These functions create Tk widgets.  'tkwidget' creates a widget of
     a given type, the others simply call 'tkwidget' with the
     respective 'type' argument.

     The functions starting 'ttk' are for the themed widget set for Tk
     8.5 or later.  A tutorial can be found at <URL:
     http://www.tkdocs.com>.

     It is not possible to describe the widgets and their arguments in
     full.  Please refer to the Tcl/Tk documentation.

_S_e_e _A_l_s_o:

     'TclInterface', 'TkCommands', 'TkWidgetcmds'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     ## These cannot be run by examples() but should be OK when pasted
     ## into an interactive R session with the tcltk package loaded

     tt <- tktoplevel()
     label.widget <- tklabel(tt, text="Hello, World!")
     button.widget <- tkbutton(tt, text="Push",
                               command=function()cat("OW!\n"))
     tkpack(label.widget, button.widget) # geometry manager
                                         # see Tk-commands

     ## Push the button and then...

     tkdestroy(tt)

     ## test for themed widgets
     if(as.character(tcl("info", "tclversion")) >= "8.5") {
       # make use of themed widgets
       # list themes
       as.character(tcl("ttk::style", "theme", "names"))
       # select a theme -- here pre-XP windows
       tcl("ttk::style", "theme use", "winnative")
     } else {
       # use Tk 8.0 widgets
     }
     ## End(Not run)

