Some questions on elided text in the text widget (and a few other text widget questions) 
Author Message
 Some questions on elided text in the text widget (and a few other text widget questions)

I believe elided text may be useful for some work I'm doing with the
text widget, but would appreciate some feedback as to whether
my reading of -elide is correct. (As opposed to experimenting
for hours and still not being absolutely sure :-) )

The text docs seem to indicate that elided text behaves
exactly like unelided text, except:
        1) It is not displayed
        2) It is not searched for by default reg exp searches

To me, this implies the following:
        1) Using the cursor keys to move through a range of
        elided text will show no apparent motion until the
        cursor is out of the text. Will the cursor still be
        visible?

        2) Pressing backspace while in elided text will
        delete an elided character (as opposed to, say,
        deleting the first visible character before the
        elided range.

        3) Extracting text from the widget will always
        return elided as well as visible text. Is there
        any easy/efficient (i.e. rather than going through
        the text looking at tags) to extract only the
        visible text?

I'm also considering the possibility of using some sort of
Unicode zero-width character--I assume there must be one
(or several), but (as a Tkinter user) don't know the rules
of the game for using Unicode in a text widget. (For that
matter, I don't even know how to find such characters.) Any
hints?

Finally, a couple of other text questions.

First, given that the Canvas widget can write to postscript,
why can't the Text one? Given that the canvas can display
text anyway, I would've thought it would be relatively easy
to use the code in the Text widget.

And, why the heck is it named 'elide'? Why not, 'hidden'? :-)

I'll be out of town for a few days, and may miss some news,
so if you could email as well as posting, I'd appreciate it.

Thanks,
Ken



Mon, 04 Sep 2006 16:17:31 GMT  
 Some questions on elided text in the text widget (and a few other text widget questions)

Quote:

> I believe elided text may be useful for some work I'm doing with the
> text widget, but would appreciate some feedback as to whether
> my reading of -elide is correct. (As opposed to experimenting
> for hours and still not being absolutely sure :-) )

> The text docs seem to indicate that elided text behaves
> exactly like unelided text, except:
>    1) It is not displayed
>    2) It is not searched for by default reg exp searches

> To me, this implies the following:
>    1) ...
>    2) ...
>    3) ...

Why don't you spend two minutes in an interactive shell and find out? I
don't intend to be snide; the ability to interactively try things out
with just a handful of lines of code is one of Tcl's true virtues. The
questions you ask can easily be answered with just a few moments of
experimentation.


Tue, 05 Sep 2006 00:11:46 GMT  
 Some questions on elided text in the text widget (and a few other text widget questions)

Quote:

> And, why the heck is it named 'elide'? Why not, 'hidden'? :-)

elide (verb) : To pass over without giving due attention.*

hide (verb) : To withdraw or withhold from sight or observation.*

Considering its effect on the displaying of text, then either term
applies.  When considering its effect on searching, then elide seems
more apropos.

Curiously, my thesaurus does not list either as a synonym of the other.

-Brian

*: definitions from Merriam-Webster Dictionary & Thesaurus.



Tue, 05 Sep 2006 01:00:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. embedding text widgets in other text widgets

2. Question: How to hide text in text-widgets

3. nroff formated texts in Tk text widget (this is not a question, this is the answer)

4. Stability of mark order in text widgets, and a few other questions

5. Bug in text widget with -elide

6. Elided text not mentioned in text man page

7. Tkinter text-widget, getting the text

8. Tkinter code for formatted text in Text widget?

9. text widget must follow end of text only if associated scrollbar is at bottom

10. how to change foreground color of text in text widget

11. text widget: select color on text with background

12. Deleteing text in a text widget?

 

 
Powered by phpBB® Forum Software