Text Widget

   

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

Table of Contents
Chapter 48.  Tcl 7.4/Tk 4.0


The tags and marks of the text widgets have been cleaned up a bit, justification and spacing are supported, variable tab stops can be defined, and you can embed widgets in the text display.

A mark now has a gravity, either left or right, that determines what happens when characters are inserted at the mark. With right gravity you get the old behavior: the mark gets pushed along by the inserted text by sticking to the right-hand character. With left gravity it remains stuck. The default is right gravity. The mark gravity operation changes it.

When text is inserted, it only picks up tags that are present on both sides of the insert point. Previously it would inherit the tags from the character to the left of the insert mark. You can also override this default behavior by supplying tags to the insert operation.

The widget scan operation supports horizontal scrolling. Instead of using marks like @y, you need a mark like @x,y.

For a description of the new features, see Chapter 33.


       
    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