#319 Additional options for text widget tags

open
Jeffrey Hobbs
18. [text] (26)
5
2012-01-05
2012-01-05
Francois VOGEL
No

Proposals for implementation of Tk Feature Request #1759972

https://sourceforge.net/tracker/?func=detail&aid=1759972&group_id=12997&atid=362997

Discussion

  • Francois VOGEL
    Francois VOGEL
    2012-01-05

    Proposal for implementation of -selectbackground option only (for the time being)

     
    Attachments
  • Francois VOGEL
    Francois VOGEL
    2012-01-05

    Patch for addition of -selectbackground to text tags.

    Take this as a trial balloon. If the principles of implementation turn out to be correct, I would provide additional patches for the rest of what is requested in #1759972.

    The patch is against the latest Fossil sources of Tk.

     
  • Francois VOGEL
    Francois VOGEL
    2012-01-11

    Btw, test case showing the new -selectbackground feature:

    text .t
    .t insert 1.0 "hello world line 1\n"
    .t insert end "hello world line 2\n"
    .t insert end "hello world line 3\n"
    pack .t
    .t tag add mytag 1.1 1.4 2.6 2.10
    .t tag configure mytag -background green
    .t tag configure mytag -selectbackground yellow ; # new !!
    .t tag add sel 1.2 1.7 2.1 2.12
    focus -force .t

    .t tag cget mytag -selectbackground
    .t tag configure mytag