| Did you know ... | Search Documentation: |
| list_browser->style |
<->style
= name using the attributes from the given style
object.
Suppose one has a list_browser that visualises a lexicon and we want the present all items that also appear in a glossary on the same domain in bold-face. This may be achieved using:
show_lexicon :-
new(B, browser('Lexicon')),
send(B, style, glossary, style(bold := @on)),
( lexicon(Item),
send(B, append, new(D, dict_item(Item))),
( glossary(Item)
-> send(D, style, glossary)
; true
),
fail
; true
),
send(B, open).
A style applies to the whole item. To use multiple fonts or colours
within an item, use a markup
object as label (see
dict_item<-label).
The markup applies on top of the style. An icon can only be specified
using a style.