DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2131 Version: 1.4-feature Problem seems to be this line in Fl_Help_View::find(): topline(b->y - b->h); ..which is executed when there's a match to attempt to scroll the display to the matching string. The search is working; it's finding the text. But the (b->y - b->h) seems to be wrong; when doing a match for "README" in the example HTML, b->y is 150 and b->h is 3696. This causes a negative value to be passed to topline(), causing the screen not to move. Seems that b->y is the y position of the text for the top of the current html 'block' (which in this case is the <PRE> block), and b->h is the height of the entire <PRE> block. So unless the block is very small, the above code doesn't work. I think what's needed is to calculate the y position, taking into account the line heights and the number of crlf's encountered to properly calculate the position of the matching text. Not sure how to do that properly, since line height can vary even within a line (due to multiple font sizes), so I guess taking the 'max' of the char height for all chars in each line, and adding that to the runing position whenever a crlf is encountered might be correct. Link: http://www.fltk.org/str.php?L2131 Version: 1.4-feature _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
