epos4u Posted November 19, 2014 Share Posted November 19, 2014 Hi, how can i scroll UnimList by code, need to have a button, once clicked it will scroll to bottom or top Many Thanks, Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 21, 2014 Share Posted November 21, 2014 Hi, Try: procedure TMainmForm.UnimButton1Click(Sender: TObject); var ListJSName: string; begin //scrollToTop ListJSName := UnimList1.JSName; UniSession.AddJS(ListJSName + '.select(0);' + ListJSName + '.getScrollable().getScroller().scrollToTop(true);'); end; procedure TMainmForm.UnimButton2Click(Sender: TObject); var ListJSName: string; begin //scrollToEnd ListJSName := UnimList1.JSName; UniSession.AddJS(ListJSName + '.select(' + ListJSName + '.store.getCount() - 1);' + ListJSName + '.getScrollable().getScroller().scrollToEnd(true);'); end; Best regards. 1 Quote Link to comment Share on other sites More sharing options...
epos4u Posted November 21, 2014 Author Share Posted November 21, 2014 Delphi Developer, A Big Thank you, it works, i will have to try and learn some scripting Hi, Try: procedure TMainmForm.UnimButton1Click(Sender: TObject); var ListJSName: string; begin //scrollToTop ListJSName := UnimList1.JSName; UniSession.AddJS(ListJSName + '.select(0);' + ListJSName + '.getScrollable().getScroller().scrollToTop(true);'); end; procedure TMainmForm.UnimButton2Click(Sender: TObject); var ListJSName: string; begin //scrollToEnd ListJSName := UnimList1.JSName; UniSession.AddJS(ListJSName + '.select(' + ListJSName + '.store.getCount() - 1);' + ListJSName + '.getScrollable().getScroller().scrollToEnd(true);'); end; Best regards. Quote Link to comment Share on other sites More sharing options...
SISBLU Software Posted August 16, 2019 Share Posted August 16, 2019 not work! getScrollable().getScroller() is not a function Version: 1.90.0.1504 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 16, 2019 Share Posted August 16, 2019 1 hour ago, Daha Software said: not work! getScrollable().getScroller() is not a function Version: 1.90.0.1504 We will check. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.