Text widget - feature suggestion - TCL

This is a discussion on Text widget - feature suggestion - TCL ; What do you think about adding a new option for "text get"? It could be: "-formatted ?linewidth?", or something like this (optional parameter "linewidth" could be used for formatting at the different amount of characters per line, if one wouldn't ...

+ Reply to Thread
Results 1 to 3 of 3

Text widget - feature suggestion

  1. Default Text widget - feature suggestion

    What do you think about adding a new option for "text get"? It could be:
    "-formatted ?linewidth?", or something like this (optional parameter
    "linewidth" could be used for formatting at the different amount of
    characters per line, if one wouldn't keep the actual text widget line width).

    Its purpose would be to insert the ending line breaks ("\n" for Unix, "\r\n"
    for Windows...), when taking the text widget's contents. It's because the
    widget has built-in formatting algorithms, so writing such formatting
    procedure again, especially for taken text, is somewhat redundant.
    --
    ZB

  2. Default Re: Text widget - feature suggestion

    ZB wrote:

    > What do you think about adding a new option for "text get"? It could be:
    > "-formatted ?linewidth?", or something like this (optional parameter
    > "linewidth" could be used for formatting at the different amount of
    > characters per line, if one wouldn't keep the actual text widget line
    > width).
    >
    > Its purpose would be to insert the ending line breaks ("\n" for Unix,
    > "\r\n" for Windows...), when taking the text widget's contents. It's
    > because the widget has built-in formatting algorithms, so writing such
    > formatting procedure again, especially for taken text, is somewhat
    > redundant.


    Would "::textutil::adjust" from tcllib do what you want?

    Andrew

  3. Default Re: Text widget - feature suggestion

    Dnia 24.02.2008 Andrew Mangogna <amangogna@mindspring.com> napisał/a:

    > Would "::textutil::adjust" from tcllib do what you want?


    Actually... yes. Thanks, again missed ready solution.
    --
    ZB

+ Reply to Thread