tkTool: Conveniently manipulate Tk toolbars

Description Usage Arguments Details Value Author(s) See Also

Description

These functions provide an easy way to create and manipulate Tk toolbars under R. Note that the corresponding toolXXX() function also manipulate Tk toolbars the same way, but are capable of manipulating other toolbars as well (not currently, but that could be implemented in the future). One should, thus, preferably use toolXXX()!

Usage

1
2
3
4
5
6
7
8
tkToolAdd(toolbar, side = "top")
tkToolAddItem(toolbar, item, action, image = "", options = "")
tkToolDel(toolbar)
tkToolDelItem(toolbar, item)
tkToolItems(toolbar)
tkToolChangeItem(toolbar, item, action = "", options = "")
tkToolStateItem(toolbar, item, active = TRUE)
tkToolInvoke(toolbar, item)

Arguments

toolbar

name of a Tk toolbar.

side

where to place the toolbar in the window (\"top\", \"bottom\", \"left\", or \"right\")?

item

name of a toolbutton.

action

action the toolbutton triggers (R code).

image

name of a Tk image to display in the toolbutton.

options

additional options, for instance 'state = "disable"' to disable the toolbutton at creation.

active

do we enable or disable the toolbutton?

Details

Do not use these functions directly. Prefer the corresponding toolXXX() functions that will call them if Tk toolbars or toolbutton are provided.

Value

tkToolAdd() and tkToolAddItem() return the handle of the newly created toolbar or toolbutton invisibly. tkToolDel() and tkToolDelItem() return invisibly TRUE if the resource is found and deleted, FALSE otherwise. tkToolItems() returns the list of all items in a given toolbar. tkToolInvoke() returns invisibly TRUE if the toolbutton was invoked, FALSE otherwise. tkToolStateItem() returns the new state of the toolbutton.

Author(s)

Philippe Grosjean

See Also

toolAdd


svWidgets documentation built on May 2, 2019, 8:22 a.m.