Description Usage Arguments Details Value Author(s) References See Also Examples
The current tcltk library does not support dropdown lists unless an extension is included. The function dropdownList provide an alternative.
1 2 3 | dropdownList(base, options, textvariable, width = 10, default, editable
= FALSE)
getListOption(targetWidget, options, height, vScroll = FALSE)
|
base |
|
options |
|
textvariable |
|
width |
|
default |
|
targetWidget |
|
editable |
|
height |
|
vScroll |
|
base
can be a top window or a frame.
The widget returns a frame that contains a dropdown list. The frame need to be placed using any of the layout methods of tcltk. The value of the selection will be accessed through the tclVar object passed to the function.
getListOptions is called by dropdown list to get the selected item
dropdownList returns a tkwin object for the frame that contains a dropdown list
getListOptions returns a character string for the selected item
Jianhua Zhang
tcltk
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
## These cannot be run by examples() but should be OK when pasted
## into an interactive R session with the widgetTools package loaded
base <- tktoplevel()
selection <- tclVar()
dropdownList(base, c("Option 1", "Option 2", "Option 3"),
selection, 15, "Option 2")
tclvalue(selection)
# 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.