There's more than one way to do things | |
PerlMonks |
Tk: Make lines disappear in a Text widget?by bschmer (Friar) |
on Oct 09, 2003 at 15:07 UTC ( [id://297937]=perlquestion: print w/replies, xml ) | Need Help?? |
bschmer has asked for the wisdom of the Perl Monks concerning the following question:
I'm prototyping an app that will display a file in a Text widget and allow you to apply filters to the text that will make the matching lines change attributes (color, bold, etc). One of the things that I would like the app to do is be able to make the lines disappear altogether, but easily be able to put them back if the filter is removed.
I get the attribute changing fairly cheaply by using tags and there is a -hidden flag that can be applied to tags, but from reading the source it seems as though hidden just means hidden from searches of the text, not hidden from the display. I've also tried finding a font that wouldn't display, but the only thing that I've found in X is nil2 which still leaves a 2 pixel high version of the line visible. I have to admit that I'm lazy and am not too interested in putting the text into a canvas to accomplish this, but I would do that as a last resort. Are there any ideas lurking these hallowed halls to help me continue the path of laziness?
Back to
Seekers of Perl Wisdom
|
|