EVOLUTION-MANAGER
Edit File: TkWidgets.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Tk widgets</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for TkWidgets {tcltk}"><tr><td>TkWidgets {tcltk}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Tk widgets</h2> <h3>Description</h3> <p>Create Tk widgets and associated <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects. </p> <h3>Usage</h3> <pre> 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, ...) ttklabel(parent, ...) ttklabelframe(parent, ...) ttkmenubutton(parent, ...) ttknotebook(parent, ...) ttkpanedwindow(parent, ...) ttkprogressbar(parent, ...) ttkradiobutton(parent, ...) ttkscale(parent, ...) ttkscrollbar(parent, ...) ttkseparator(parent, ...) ttksizegrip(parent, ...) ttkspinbox(parent, ...) ttktreeview(parent, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>parent</code></td> <td> <p>Parent of widget window.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>string describing the type of widget desired.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>handled via <code><a href="TclInterface.html">.Tcl.args</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>These functions create Tk widgets. <code>tkwidget</code> creates a widget of a given type, the others simply call <code>tkwidget</code> with the respective <code>type</code> argument. </p> <p>The functions starting <code>ttk</code> are for the themed widget set for Tk 8.5 or later. A tutorial can be found at <a href="http://www.tkdocs.com">http://www.tkdocs.com</a>. </p> <p>It is not possible to describe the widgets and their arguments in full. Please refer to the Tcl/Tk documentation. </p> <h3>See Also</h3> <p><code><a href="TclInterface.html">TclInterface</a></code>, <code><a href="TkCommands.html">TkCommands</a></code>, <code><a href="TkWidgetcmds.html">TkWidgetcmds</a></code></p> <h3>Examples</h3> <pre> ## 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)</pre> <hr /><div style="text-align: center;">[Package <em>tcltk</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>