06-18-2012, 05:06 AM,
(This post was last modified: 06-20-2012, 04:03 AM by RobertShiplett.)
|
|||||
|
|||||
scrolling: find, search, goto with GuiMark
The ScrollBox class combined with the Curl GuiMark facility makes possible such things as the following:
{scrollBox.scroll-to-object startGuiMark.graphic,vertical-only?=true} You can see the result at yuki as you see below: As you see, we have found the first row with ぬ夜の雪 and scrolled it to the top of the viewport. The FIND button was able to do this because we can do this: set (startGuiMark,stopGuiMark) = {poem-table.search-next {TextSearchPattern pattern=str}, gm=topGuiMark} where the str value is that of our TextField. NOTE added June 19: by adding one more 'fixed' GuiMark at the top of our container, we now have a generalized "rolling" search. The top mark is only fixed in the sense that we leave it invariant and use it to reassign our "roving" topGuiMark. A flag is used to determine the need to reset when find fails or ValueFinished fires in the search field. The challenge is that we are not searching in text, but rather in a graphical hierarchy in which some Visual objects contain text.
Robert Shiplett, Curlr
Fredericton NB Canada |
|||||
« Next Oldest | Next Newest »
|
Users browsing this thread:
2 Guest(s)
2 Guest(s)