set the dgprop["show vscrollbar"] of group "Datagrid 1" to false
set the dgProp["scroll when vscrollbar is hidden"] of group "DataGrid 1" to true
But while it worked fine in dev and compiled to macOS, on iOS it just disables scrolling all together. (so I guess the 2nd command was not working on iOS??)
This seems to be a problem not only for dataGrids.
For instance, if I import an image that is 330 pixels wide and group it into a group that is
100 pixels wide I can scroll the picture with a horizontal scrollbar.
A while back (well, about 9 years ago) I authored a program for my EFL school and hived off standalones from it for Linux 32-bit.
It contains a large number of images that are larger than the screen they are displayed on, and those images are all grouped as
groups (surely not?) with horizontal scrollbars. They can be scrolled by dragging with the mouse on the images themselves.
Opening that program in 9.6.1 that capability seems to have been lost.
Жалко!
Last edited by richmond62 on Sun Aug 30, 2020 7:23 am, edited 1 time in total.
richmond62 wrote: Sat Aug 29, 2020 8:19 pm
This seems to be a problem not only for dataGrids.
Opening that program in 9.6.1 that capability seems to have been lost.
Жалко!
Ok, maybe I'll file a bug report and see what comes of it. It definitely does not scroll at all on iOS which doesn't sound like the correct behaviour. But then, maybe I am just missing something,
marksmithhfx wrote: Sat Aug 29, 2020 10:50 pm
Ok, maybe I'll file a bug report and see what comes of it. It definitely does not scroll at all on iOS which doesn't sound like the correct behaviour. But then, maybe I am just missing something,
Ok, I did file a bug report and it turns out that it is not just those two lines that are the culprit (they actually work fine on their own, if you put them in openCard not preOpenCard) but those two lines PLUS some DG2 commands like setting Edit Mode, Swipes and Animations on that create the problem. To be clear, the combination of the scroller commands and the DG2 commands works fine in dev and macOS but in iOS causes scrolling to be completely disabled. The investigation continues.
mark, I know you're not a beginner, but for the sake of posterity for the next person who reads this, i'm going to break it down for a beginner.
on ios, the scroller is a separate native object that overlays the card.
if you want to read the code, in the PB, click on your DG then click on the "2".
Things that you might want to play with:
change line 67 from local sScrollerID to global sscrollerid. then you can more easily fiddle with the settings when the app is up on ios
add a button to the card that has the dg on it. add the following script to that button. This will allow you to live-test different property changes to the scroller on mobile:
on mouseUp
global toDo
ask "What?" with toDo
if it is empty then exit mouseUp
put it into toDo
do toDo
end mouseUp
Once the app is up, don't forget to click on the button and type global sScrollerID so you can then manipulate the scroller with the button (because you have to declare it to be global not just in the behavior script but in the main context, too, because that's where you're going to be using it.)
Look in the dictionary at mobileControlSet for all the things you can do to a mobile object like a scroller, now that you can do it live in your app.
I don't know, for instance, if making the scroller invisible will disable it or not. You might also try messing with the rect of the scroller (making it wider than the card, for example) so that it still scrolls but you don't see it. If you do that, you might also need to disable horizontal scrolling.
change the delayTouches property from false to true because it breaks scrolling, and the mothership has thus far declined to fix it despite a PR and a bug report, because they are prioritizing another change they made previously.
if you want to make any of those changes permanent, you can do so in the behavior script that you opened previously, because the datagrid template is attached to your stack.
Mikey wrote: Sun Sep 13, 2020 2:49 pm
[*] change the delayTouches property from false to true because it breaks scrolling, and the mothership has thus far declined to fix it despite a PR and a bug report, because they are prioritizing another change they made previously.
[*] if you want to make any of those changes permanent, you can do so in the behavior script that you opened previously, because the datagrid template is attached to your stack.
HTH
Mikey, thanks for this. These are some great suggestions. I will give it a try.