tk2commands {tcltk2}R Documentation

Tk commands associated with the tk2XXX widgets

Description

These commands supplement those available in the tcltk package to ease manipulation of tk2XXX widgets.

Usage

tk2column(widget, action = c("add", "configure", "delete", "names", "cget",
    "nearest"), ...)
tk2insert.multi(widget, where = "end", items)
tk2list.delete(widget, first, last = first)
tk2list.get(widget, first = 0, last = "end")
tk2list.insert(widget, index = "end", ...)
tk2list.set(widget, items)
tk2list.size(widget)
tk2notetraverse(nb)
tk2notetab(nb, tab)
tk2notetab.select(nb, tab)
tk2notetab.text(nb)
tk2state.set(widget, state = c("normal", "disabled", "readonly"))
is.tk()
is.ttk()
tk2theme.elements()
tk2theme.list()
tk2theme(theme = NULL)
tk2style(class, style, state = c("default", "active", "disabled", "focus",
    "!focus", "pressed", "selected", "background", "readonly", "alternate",
    "invalid", "hover", "all"), default = NULL)
tk2dataList(x)
tk2configList(x)

Arguments

widget

the widget to which these actions apply.

action

which kind of action?

where

where are these item added in the list (by default, at the end).

items

the items to add (either a vector for a single line, or a matrix for more items).

...

further arguments to the action.

first

the 0-based first index to consider in the list.

last

the 0-based last index to consider in the list, or "end" for using the last element of the list.

index

the 0-based index where to insert items in the list.

nb

a tk2notebook or ttk2notebook widget (\"tclObj\" object).

tab

the name (text) of a tab in a notebook.

state

the new state of the widget, or the state to inquiry.

theme

a theme to use (character string).

class

the class of the tk2widget (either the Tk class, like TButton, or the name of the function that creates it, like tk2button)

style

a character string with the name of the style to retrieve

default

the default value to return in case this style is not found

x

either a tk2widget object, or a character string with its class name.

Details

tk2column() manipulate columns of a tk2mclistbox widget, tk2insert.multi() is used to insert multiple field entries in a tk2mclistbox widget, is.tk() determines if the tk package is loaded (on some platforms it is possible to load the tcltk package without tk, for instance, in batch mode). is.ttk() determines if 'ttk' widgets (styled widgets) used by the tk2XXX() functions are available (you need Tk >= 8.5).

Note

In comparison with traditional Tk widgets, ttk proposes an advances mechanism for styling the widgets with \"themes\". By default, it adapts to the current platform (for instance, under Windows XP with XP theme, all widgets take the appearance of XP themed widgets (even with custom themes applied!). Usual Tk widgets are ALWAYS displayed in old-looking fashion under Windows XP. If you want, you can switch dynamically to a different theme among those avaiable (list them using tk2theme.list(), and switch to another one with tk2theme(newtheme). This is most useful to see how your GUI elements and dialog boxes look like on foreign systems. If you prefer, let's say, a Unix look of the R GUI elements under Windows, these functions are also useful. If you are more advanturous, you can even design your own themes (see the tile documentation on the Tcl wiki).

Author(s)

Philippe Grosjean

See Also

tk2widgets, tk2tip


[Package tcltk2 version 1.2-3 Index]