Tk Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 1754048
Title: Extra options for tags
Type: RFE Version: None
Submitter: kjnash Created on: 2007-07-14 17:26:46
Subsystem: 18. [text] Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2016-03-20 08:28:56
Resolution: Fixed Closed By: fvogel
    Closed on: 2016-03-20 08:28:56
Description:
As part of Tklib's ntext package, I have written bindings for Tk's text widget that indent wrapped display lines (other than the first of each logical line) using -lmargin2.  The purpose is to make all display lines observe the same leading whitespace as the first, giving a neater display of text.

New options for text tags would greatly help the visual interpretation of text displayed in this way.  The options I would like are:

  -lmargin2color color
  specifies the background color to use (instead of "-background color") in regions that cannot contain characters because they are indented by -lmargin2

  -lmargin2stipple bitmap
  specifies a bitmap that is used as a stipple pattern for the background (instead of "-bgstipple bitmap") in regions that cannot contain characters because they are indented by -lmargin2

Other users might want corresponding tag options for -lmargin1 and -rmargin; for my purposes, I only need these tag options for -lmargin2.

The requested features are widely used in text editors (e.g. see the attached image of KDE's Kate), and I cannot find any way to implement them with the text widget's existing feature set.
User Comments: fvogel added on 2016-03-20 08:28:56:
[http://tip.tcl.tk/443.html|TIP #443] ws accepted by TCT vote (but new stippling tag options were rejected).

Now merged to core-8-6-branch and trunk.

fvogel added on 2016-03-08 21:36:39:

TIP #443 deals with this RFE.


fvogel added on 2016-02-11 13:24:07:
I suggest to simplify a bit while still filling the need expressed in the ticket.

Proposal:
  - add "-lmargincolor" tag configuration option, which colorizes the left margins (both lmargin1 and lmargin2)
  - add "-rmargincolor" tag configuration option, which colorizes the right margin
  - forget about bgstipples in all margins

What do you think?

kjnash added on 2007-07-15 00:26:46:
File Added - 237010: kate.png

Attachments: