Description Usage Arguments Details Value Author(s) See Also Examples
This function associates a tk listbox with a scroll bar and then puts them into a given tk widget.
1 2 | makeViewer(target, vWidth = "", vHeight = "", hScroll = FALSE,
vScroll = TRUE, what = "list", side = "left", text = "")
|
target |
tk widget that can accommodate a list box. |
vWidth, vHeight |
integers giving width and height of the listbox. |
hScroll, vScroll |
logicals indicating whether a horizontal or vertical scroll bar should be associated with the list box. |
what |
A character string indicating the type of the viewer to be put on a widget. Valid types include "list" for list box, "canvas", and "text" for text box |
side |
A character string for the geometry management of the viewer on the widget. Valid values include "left", "right", "top", and "bottom" |
text |
A character string to be displayed |
Tk list boxes (or canvas, text box) and scroll bars are separate widgets. This function provides a common interface to put them together and functionally associated.
This function does not return any value.
Jianhua (John) Zhang
tklistbox
(from the ‘tcltk’
package).
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
## These cannot be run by examples() but should be OK when pasted
## into an interactive R session with the widgetTools package loaded
# Create a top level window and put a list box in it
base <- tktoplevel()
listBox <- makeViewer(base)
# Destroy toplevel widget
# tkdestroy(base)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.