JS Client NativeList $vscroll
Philip Tulett
philip.tulett at pdq-networks.com
Sat Sep 11 09:48:02 UTC 2021
Hi Michael,
I use the following code in JS apps:-
Do $cinst.$objs.ListObj.$vscroll.$assign(ivListName.$line)
That will scroll the list on screen to selected line, so you may need the following to select the last line first..
Calculate ivListName.[ivListName.$linecount].$selected.$assign(kTrue)
Kind regards
Philip Tulett
-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Bruno Del Sol
Sent: 11 September 2021 09:41
To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>; Michael Houlberg <michael at houlbergdevelopment.com>
Subject: Re: JS Client NativeList $vscroll
Hi Michael,
I did not test this, but have you tried to select the line to force the scroll ?
as in :
Calculate ivCallList.$line as ivCallList.$linecount
Calculate ivCallList.[ivCallList.$linecount].$selected.$assign(kTrue)
Regards
Bruno
By Design
http://www.bydesign.fr
Bruno Del Sol
bruno.delsol at bydesign.fr
46, rue de La Tour d'Auvergne
75009 Paris (France)
Le 10/09/2021 à 22:26, Michael Houlberg a écrit :
> JS Client experts:
>
> I’m using the JS Client and running my app in the Omnis Wrapper on iPad.
>
> I like the NativeList control for a number of reasons, but there is a functionality that is missing, the $vscroll property that other list controls have. Here I’m filling a list and I want to move the current line to the last line in the list, but I also want it to scroll down to show that line. If the selected line is below the viewable area, it selects the line correctly, but the scroll bar is positioned at the very top of the list so you don’t see the selected line.
>
> Do ivCallList.$select(con("WHERE fCalls.ad_ID =",ivID)) Do
> ivCallList.$fetch(kFetchAll) Do ivCallList.$sort($ref.CallDate,kFalse)
> Calculate ivCallList.$line as ivCallList.$linecount
>
> # $vscroll is not a property of the NativeList control so this doesn't
> work Calculate $cwind.$objs.MainPane.$objs.CallList.$vscroll as
> ivCallList.$linecount
>
> Does anyone have some other magic way I can get the list to scroll down to this line?
>
> There are other places in the program where I search for a specific record in a list to select it, and if that line is below the viewable area, it’s the same problem.
>
> Thanks,
> Michael Houlberg
> Houlberg Development, LLC
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com Start a
> new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list