Generic function
Returns the function that is used to compute the label for the items in the specified gadget.
gadget-label-key gadget => label-key
<collection-gadget>.
<function>.
duim-gadgets
duim-gadgets
Returns the function that is used to compute the labels for the items in gadget. Using a label key can be a useful way of consistently specifying labels that are a mapping of, but not directly equivalent to, the item names. As shown in the example, it is possible to force the case of item labels, and this is useful if the items are specified as symbol names, rather than strings.
The following code creates a list box whose items are the lower-cased equivalents of the symbols stated.
*gadget* := contain
(make(<list-box>,
items: #(#"One", #"Two", #"Three"),
label-key:
method (symbol)
as-lowercase
(as(<string>, symbol))
end));The label key function can be returned as follows:
gadget-label-key(*gadget*);
gadget-label, page 569
gadget-label-setter, page 571
gadget-value-key, page 589