File: rat_flowmsg.tcl

package info (click to toggle)
tkrat 1%3A2.2cvs20100105-true-dfsg-6.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,340 kB
  • ctags: 9,259
  • sloc: ansic: 96,057; tcl: 25,667; makefile: 1,638; sh: 282
file content (21 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# rat_flowmsg.tcl
#
# Create a message-widget which fills the available horizontal space

package provide rat_flowmsg 1.0

namespace eval rat_flowmsg {
}

# rat_flowmsg::create
#
# Creates the flowing message
#
# Arguments:
# The same as the message widget

proc rat_flowmsg::create {w args} {
    eval [concat message $w -highlightthickness 0 -bd 0 -padx 0 $args]
    set p [winfo parent $w]
    bind $w <Configure> "$w configure -width \[expr \[winfo width $p\] - 2*(\[$w cget -bd\]+\[$w cget -padx\]+\[$w cget -highlightthickness\])\]"
}