A list box with constant number of rows.
bs_listbox(
parent,
values = variables_all(),
value = NULL,
selection = NULL,
selectmode = c("single", "extended", "browse", "multiple"),
title = NULL,
subtitle = NULL,
tip = "",
height = getRcmdr("variable.list.height"),
width = getRcmdr("variable.list.width"),
enabled = TRUE,
scroll = c("both", "x", "y", "none"),
autoscroll = c("x", "y", "both", "none"),
use_filter = FALSE,
filter_label = "Filter",
sticky = "nw",
on_select = do_nothing,
on_click = do_nothing,
on_double_click = do_nothing,
on_triple_click = do_nothing,
on_release = do_nothing,
on_click_3 = do_nothing,
on_double_click_3 = do_nothing,
on_triple_click_3 = do_nothing,
on_release_3 = do_nothing,
on_keyboard = c("select", "scroll", "ignore"),
on_keyboard_fun = do_nothing,
bind_row_swap = FALSE,
title_sticky = "w",
subtitle_sticky = title_sticky,
title_color = getRcmdr("title.color"),
subtitle_color = "black",
filter_label_color = title_color,
...
)
# S3 method for class 'listbox'
get_size(obj, ...)
# S3 method for class 'tkwin'
get_size(obj, ...)
get_values_listbox(listbox, trim = FALSE)
# S3 method for class 'listbox'
get_values(obj, ...)
# S3 method for class 'tk2listbox'
get_values(obj, vals, ...)
set_values_listbox(listbox, values, clear = TRUE, ignore_on_disabled = FALSE)
# S3 method for class 'listbox'
set_values(obj, values, ..., clear = TRUE)
# S3 method for class 'tk2listbox'
set_values(obj, values, ..., clear = TRUE)
# S3 method for class 'listbox_with_filter'
set_values(obj, values, ..., clear = TRUE)
get_selection_ind_listbox(listbox)
get_selection_listbox(listbox)
# S3 method for class 'listbox'
get_selection(obj, ..., index = FALSE)
# S3 method for class 'tk2listbox'
get_selection(obj, ..., index = FALSE)
# S3 method for class 'listbox'
get_selection_length(obj, ...)
# S3 method for class 'tk2listbox'
get_selection_length(obj, ...)
set_selection_listbox(listbox, sel, clear = TRUE)
# S3 method for class 'listbox'
set_selection(obj, sel, clear = TRUE, ...)
# S3 method for class 'tk2listbox'
set_selection(obj, sel, clear = TRUE, ...)
# S3 method for class 'listbox'
add_selection(obj, sel, ...)
# S3 method for class 'tk2listbox'
add_selection(obj, sel, ...)
move_selected_row_in_box(tkobj, move_to = "+1")
move_selection_in_box(tkobj, move_to = "+1")
move_selected_row_in_listbox__previous_version(listbox, move_to = "")
# S3 method for class 'listbox'
tk_bind_row_swap(obj, ...)
# S3 method for class 'tk2listbox'
tk_bind_row_swap(obj, ...)
# S3 method for class 'listbox'
set_yview(obj, ind, ...)
# S3 method for class 'tk2listbox'
set_yview(obj, ind, ...)
# S3 method for class 'listbox'
get_yview(obj, ...)
# S3 method for class 'tk2listbox'
get_yview(obj, ...)
# S3 method for class 'listbox'
tk_yview_moveto(obj, ...)
# S3 method for class 'tk2listbox'
tk_yview_moveto(obj, ...)
# S3 method for class 'listbox'
tk_see(obj, ind, ...)
# S3 method for class 'tk2listbox'
tk_see(obj, ind, ...)
# S3 method for class 'listbox'
tk_get_state(obj, ...)
# S3 method for class 'tk2listbox'
tk_get_state(obj, ...)
# S3 method for class 'listbox'
tk_disable(obj, ..., background = "grey95")
# S3 method for class 'tk2listbox'
tk_disable(obj, ..., background = "grey95")
# S3 method for class 'listbox_with_filter'
tk_disable(
obj,
...,
background = "grey95",
ignore_filter = FALSE,
clear_filter = !ignore_filter
)
# S3 method for class 'listbox'
tk_normalize(obj, ..., background = "white")
# S3 method for class 'tk2listbox'
tk_normalize(obj, ..., background = "white")
# S3 method for class 'listbox_with_filter'
tk_normalize(obj, ..., background = "grey95")
# S3 method for class 'listbox'
tk_enable(obj, ..., background = "white")
# S3 method for class 'tk2listbox'
tk_enable(obj, ..., background = "white")
# S3 method for class 'listbox_with_filter'
tk_enable(obj, ..., background = "grey95")
Parent TCL/TK frame.
(character) Vector of possible values.
(character or NULL) Values that should be initially selected.
(integer) Numeric indices of initially selected lines.
Can be used instead of value
.
("single", "extended", "browse", "multiple") Selection mode.
(string) Title.
(string) Subtitle.
(string) Message that is displayed on muse hover.
(integer) Height of list box in lines.
(one or two integers) Minimum and maximum width of list box.
(logical) If TRUE
, widget is enabled by default.
("both", "x", "y", "none") Do we add scrollbars? Indicates scrollbar position.
("x", "y", "both", "none") Do we automatically hide scrollbars if not needed? Indicates scrollbar position.
(logical) Should list box values filter box be displayed.
(string) Label for filter entry box.
(combination of "n", "e", "w", "s" or "").
Function that is activated on value selection.
Function that is activated on single left-click.
on double left-click.
Function that is activated on triple left-click.
Function that is activated on release of left-click.
Function that is activated on single right-click.
Function that is activated on double right-click.
Function that is activated on triple right-click.
Function that is activated on release of right-click.
("select", "scroll", "ignore") Action on keyboard letter click:
toggle selection of values that start with the pressed letter. This letter binding is good for single-selection boxes, otherwise selection should not be toggled (see "scroll")
toggle view of values that start with the pressed letter. Do not toggle selection (i.e., do not select or deselect).
Do not bind any action. Letter binding is good for read-only list boxes only.
Function that is activated on keyboard button press, if
on_keyboard
is "select" or "scroll".
(Does not work yet!) if TRUE, Ctrl/Alt + Up/Down keys move rows in the list box
(combination of "n", "e", "w", "s" or "")
(combination of "n", "e", "w", "s" or "")
The colors of widget elements.
Additional arguments.
For bs_listbox()
: arguments passed to function
tk2listbox()
(see tk2widgets).
For other functions: arguments passed to further methods.
Widget.
List box widget.
(logical) Should the whitespace characters be trimmed from the beginning and the end of each string?
Values.
(logical) Should values be cleared?
(logical) Should the procedure be ignored (not performed) if a widget is disabled?
(logical) Is provided input an index? `TRUE` – index, `FALSE` – value.
Selection. Usually either character values or numeric indices.
Tcl/Tk object.
(string) Action:
"top" - selected row is moved to the first row.
"-1" - position is decreased by 1 row.
"+1" - position inreased by 1row.
"end" - selected row is moved to the last row.
Index. Usually either character values or numeric indices.
(character) Background color.
(logical) Should disabling/enabling of filter be ignored?
(logical) Should the filter be cleared an values of listbox reset?