I *am* keen to make more text for the mask as requested and Richard's idea is a good one, but i would have to have a decent look. The tk text widget is very powerful and word wrap can normally be done using inbuilt features of the text widget. (tags, "-wrap", "-width")
Also, I will probably add an option to make the tree show less data, leaving more space for the end of line mask comments. Re contributing code - If you could send contributed code as a patch, i can test it much more easily. ScidvsPC uses subversion. Once subverison is downloaded , or "checked-out" (see this page for instructions https://sourceforge.net/p/scidvspc/code/ People can make their own changes, test them using "make install", and then use "svn diff > patch" to make a patch for others to use. cheers, S.A. On Mon, Nov 30, 2015 at 6:01 PM, Steve A <stevena...@gmail.com> wrote: > Thanks Richard :) > I'll look at your email properly by the weekend. > S.A > > On Mon, Nov 30, 2015 at 6:26 AM, Richard F. Ashwell III > <rashw...@gmail.com> wrote: >> Ok as a learning exercise I wanted to see what it would take to modify >> what Yuval is looking for here in terms of displaying the comment. >> >> My first assumption was that the comment they are talking about is the >> position comment, since it is the one that displays as a single line at the >> top >> of the tree mask view. >> >> To facilitate a multi line display here I needed a word wrap function for >> the comment, I created one in tcl/utils/strings.tcl library. >> >> proc ::utils::string::wrapParagraph {n text} { >> regsub -all {\s+} [string trim $text] " " text >> set RE "^(.{1,$n})(?:\\s+(.*))?$" >> for {set result ""} {[regexp $RE $text -> line text]} {} { >> append result $line "\n" >> } >> return [string trimright $result "\n"] >> } >> >> Then In the tcl/windows/tree.tcl I added a line to wordwrap the comment text >> to 75 >> which is the width of the tree view table + the extra column for the mask >> images >> >> Inside proc ::tree:displayLines in the section #Mask position comment at top >> of move list >> >> set wrapPosComment [ ::utils::string::wrapParagraph 75 $posComment] >> >> Then I modified this line to display the wrapped text rather than the first >> line >> >> changing this: >> >> # $w.f.tl insert end "$firstLine\n" [ list bluefg tagtooltip_poscomment ] >> >> to this: >> >> $w.f.tl insert end "$wrapPosComment\n" [ list bluefg tagtooltip_poscomment ] >> >> At the very least this met the request as far as I can tell in a usable way. >> >> Potential Improvements >> After testing the experience with some larger comments, I am thinking the >> comment might >> better be displayed with at the very least a horizontal rule line separating >> it from the table >> , but my TCL is so new, haven't figured that out yet. >> >> It might also be some sort of option for people that don't want the table to >> jump around >> for really large comments, to instead move it to the bottom after the table. >> (this would be pretty easy) >> >> This canvas is pretty well done overall, my other job programming experience >> makes me think >> that the fixed width of the tree view table might enjoy a responsive width >> treatment, where in >> shorter width breakpoints each line of the table could become multi line >> folding down or hiding >> entirely some columns like the AvElo, Perf, AvYear, Draw, ECO codes. And >> then only going single line or unhiding those columns as the display width >> of the canvas increases. Ditto with the wrapping of the pos comment, as the >> generic wrapping I added could actually update the wrap point as well. >> >> Regards, >> Richard >> >> >> >> On 11/28/2015 10:01 PM, Yuval Marcus wrote: >> >> I just got around to using tree masks as a way to create my opening >> repertoire, and so far it's been great! >> >> However, one problem I have is the lack of space to view comments. I like to >> put large amount of analysis in my moves and right now the current solution >> is that I need to hover over the move and view the pop-up tooltip to read >> the entire comment. Is there a way I can view the comment all in one window, >> perhaps by wrapping the comment down (like a paragraph) in the tree window? >> >> Thanks. >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Scidvspc-users mailing list >> Scidvspc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/scidvspc-users >> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Scidvspc-users mailing list >> Scidvspc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/scidvspc-users >> ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 _______________________________________________ Scidvspc-users mailing list Scidvspc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scidvspc-users