Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scrolling: find, search, goto with GuiMark
06-18-2012, 05:06 AM, (This post was last modified: 06-20-2012, 04:03 AM by RobertShiplett.)
#1
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:

[Image: yuki-sml.jpg]


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

Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('535')