Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tooltip.tcl
Go to the documentation of this file.
1 ###
2 #
3 # Tooltips
4 #
5 
6 set useLocalTklib [catch {package require tooltip 1.4.6}]
7 if {$useLocalTklib} {
8  source [file nativename [file join $::scidTclDir "utils/tklib_tooltip.tcl"]]
9 }
10 
11 namespace eval ::utils::tooltip {
12  global ::utils::tooltip::font
13 
14  if {![info exists font]} {
15  set font TkDefaultFont
16  }
17 
18  # Undocumented tooltip variable that allows users to extend / override
19  # label creation options.
20  set tooltip::labelOpts [list -highlightthickness 0 -relief solid -bd 1 \
21  -background lightyellow -fg black -font $font]
22 
23  proc Set {button msg} {
24  tooltip::tooltip $button $msg
25  }
26 
27  proc SetTag {text_widget msg tag} {
28  tooltip::tooltip $text_widget -tag $tag $msg
29  }
30 }