Extend ScrollableWidget example to have buttons to scroll up/down by 10 pixels

This commit is contained in:
Jeremy Ruston 2023-12-31 17:14:59 +00:00
parent a8f477a3ab
commit 22f7af05de
1 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,16 @@ This wiki text shows how to display a list within the scrollable widget:
Set current scroll position to 100,100
</$button>
<$button>
<$action-setfield $tiddler="$:/my-scroll-position" scroll-top={{{ [{$:/my-scroll-position!!scroll-top}subtract[10]] }}}/>
Scroll up by 10 pixels
</$button>
<$button>
<$action-setfield $tiddler="$:/my-scroll-position" scroll-top={{{ [{$:/my-scroll-position!!scroll-top}add[10]] }}}/>
Scroll down by 10 pixels
</$button>
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo' bind='$:/my-scroll-position'>
<$list filter='[tag[Reference]]'>