The bell Command

   

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 29.  Simple Tk Widgets


The bell Command

The bell command rings the terminal bell. The bell is associated with the display; even if you are executing your program on a remote machine, the bell is heard by the user. If your application has windows on multiple displays, you can direct the bell to the display of a particular window with the -displayof option. The syntax for the bell command is given below:

 bell ?-displayof window? 

UNIX has an xset program that controls the bell's duration, pitch, and volume. The volume is in percent of a maximum, for example, 50. In practice, many keyboard bells only support a variable duration; the pitch and volume are fixed. The arguments of xset that control the bell are shown below.

 exec xset b ?volume? ?hertz? ?milliseconds? 

The b argument by itself resets the bell to the default parameters. You can turn the bell off with -b, or you can use the on or off arguments.

 exec xset -b exec xset b ?on? ?off? 

       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net