You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/04/14 11:08:52 UTC
[royale-asjs] branch develop updated: tour-de-jewel: show
scrollToIndex working
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 0520de2 tour-de-jewel: show scrollToIndex working
0520de2 is described below
commit 0520de282e10edde808c9a1cfcec4d667e075dfa
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Apr 14 13:08:43 2020 +0200
tour-de-jewel: show scrollToIndex working
---
examples/jewel/TourDeJewel/src/main/royale/ListPlayGround.mxml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/examples/jewel/TourDeJewel/src/main/royale/ListPlayGround.mxml b/examples/jewel/TourDeJewel/src/main/royale/ListPlayGround.mxml
index aef2731..0a9e3cd 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/ListPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/ListPlayGround.mxml
@@ -27,6 +27,7 @@ limitations under the License.
<fx:Script>
<![CDATA[
import org.apache.royale.collections.ArrayList;
+ import org.apache.royale.jewel.beads.controls.list.scrollToIndex;
import vos.IconListVO;
@@ -177,6 +178,11 @@ limitations under the License.
<j:Label text="Select list by item: "/>
<j:NumericStepper valueChange="list1.selectedItem = list1.dataProvider.getItemAt(event.target.value)" minimum="0" maximum="{(list1.dataProvider as ArrayList).length - 1}"/>
</j:HGroup>
+
+ <j:HGroup gap="3" itemsVerticalAlign="itemsCenter">
+ <j:Label text="Scroll to index: "/>
+ <j:NumericStepper valueChange="scrollToIndex(list1, event.target.value)" minimum="0" maximum="{(list1.dataProvider as ArrayList).length - 1}"/>
+ </j:HGroup>
</j:CardPrimaryContent>
<j:CardActions itemsHorizontalAlign="itemsRight">
<j:IconButton click="list1.selectedIndex = -1" outlined="true">