Is it possible to call ShowView and, when the complete view has been loaded, scroll to its bottom?
Background for this question:
I have a menu list where each entry loads another view. When I go back from that view to the menu, I have often to scroll manually down to resume the position before.
Hello Harald,
I think we can resume what to do with this: 1º Save the "scrollTop" of the element that we wanted, and then go to another view. 2º When the first view is shown, look at the value of the saved "scrollTop", and, goto it if we have a value different than zero, for example.
Based in the app sample that I prepare before in this thread, I modify it a bit in order to do what I describe above. Please, take a look Harald: copy the below code into a new file and save it as "MyApp.ab", then, open it with DecSoft App Builder and run it.
The "saved scroll top" variable is defined in the app's Ready event with a zero value. When we click the "Go to view 2" button (in the first view) we store the "scroll top" of the element that we wanted (the view itself in this case) in the referred variable. Then, look at the Show event of the first view: we check the value of the referred variable, and, if it's different than zero, we apply the scroll over the view.
Perfect! Works like a charm!
Thank you again for your excellent support!
Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.