Disable the scroller when scrollGroup is hidden
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Disable the scroller when scrollGroup is hidden
Hi,
Newbie LC user here.
I wanted to toggle hide and unhide my scrollGroup that contains an ios scroller using a control button. But i noticed that even when the field is hidden, when
i touch the screen the scroller will show up and will still move in relation to the finger movements as if the hidden fields are still there. Is there away to completely disable the ios scrolling when that scrollGroup is hidden. That way it will not also interfere with the swipe gestures on going from card to card.
I tried disable "scrollGroup" directly when it is on hidden state but no effect.
I also tried moving the scrollGroup while hidden but it creates a lag plus no effect.
I know that i must disable the ios scrolling altogether but since this was called on the preOpenCard i am not sure what to do.
I have read this post but inside there where no solutions offered on how to disable it.
http://forums.runrev.com/viewtopic.php?f=49&t=7285
Where do we set this on the card or on the button itself?
Thanks,
Pol
Newbie LC user here.
I wanted to toggle hide and unhide my scrollGroup that contains an ios scroller using a control button. But i noticed that even when the field is hidden, when
i touch the screen the scroller will show up and will still move in relation to the finger movements as if the hidden fields are still there. Is there away to completely disable the ios scrolling when that scrollGroup is hidden. That way it will not also interfere with the swipe gestures on going from card to card.
I tried disable "scrollGroup" directly when it is on hidden state but no effect.
I also tried moving the scrollGroup while hidden but it creates a lag plus no effect.
I know that i must disable the ios scrolling altogether but since this was called on the preOpenCard i am not sure what to do.
I have read this post but inside there where no solutions offered on how to disable it.
http://forums.runrev.com/viewtopic.php?f=49&t=7285
Where do we set this on the card or on the button itself?
Thanks,
Pol
Re: Disable the scroller when scrollGroup is hidden
Hi Pol,
you mean you can even scroll after you have HIDDEN the native iOS Scroller?
That's what I was talking about in the linked posting.
Best
Klaus
you mean you can even scroll after you have HIDDEN the native iOS Scroller?
That's what I was talking about in the linked posting.
Best
Klaus
Re: Disable the scroller when scrollGroup is hidden
You could just disable the scrolling of the iOS scroller...
and when you want it to be able to scroll again set the 'scrollingEnabled' to true
Code: Select all
iphoneControlSet theIDofTheScroller, "scrollingEnabled", "false"
Re: Disable the scroller when scrollGroup is hidden
Klaus,
Yes, when i touch the screen and pretend to scroll on the hidden area the scroll indicator will show up. Thus technically its scrolling but just cannot see the field that is scrolling.
Dixie,
Where will this code be placed on the card or on the button that controls the hide/show. I tried directly calling this
iphoneControlSet scrollid, "scrollingEnabled", true
inside my control but gives out an error handler.
Thanks.
Yes, when i touch the screen and pretend to scroll on the hidden area the scroll indicator will show up. Thus technically its scrolling but just cannot see the field that is scrolling.
Dixie,
Where will this code be placed on the card or on the button that controls the hide/show. I tried directly calling this
iphoneControlSet scrollid, "scrollingEnabled", true
inside my control but gives out an error handler.
Thanks.
Re: Disable the scroller when scrollGroup is hidden
It must be placed in the same location (card or control or ...) where the control was created. So if you created it in your card script, then hide/disable it there.
[Correction] Sorry, above is not quite correct - that's to do with messages originating from the control itself... From the docs:
Note: In general, messages dispatched by the native control are sent to the object containing the script which created it.
[Correction] Sorry, above is not quite correct - that's to do with messages originating from the control itself... From the docs:
Note: In general, messages dispatched by the native control are sent to the object containing the script which created it.
Last edited by strongbow on Wed Jul 17, 2013 12:58 pm, edited 1 time in total.
Re: Disable the scroller when scrollGroup is hidden
You can place the command to hide/show your scroller anywhere you want as long as it can 'know' its ID... So
Would work if you set the reference to the scroller using a global variable or custom property...
Code: Select all
global scrollID
iphoneControlSet scrollid, "scrollingEnabled", true
Re: Disable the scroller when scrollGroup is hidden
hmm, too funky, how can we use a HIDDEN control, native or not?poliks wrote:Yes, when i touch the screen and pretend to scroll on the hidden area the scroll indicator will show up. Thus technically its scrolling but just cannot see the field that is scrolling.
I would consider this as a bug, although uncertain it its Apple's or Livecode's fault

Re: Disable the scroller when scrollGroup is hidden
No Klaus, you can't consider this a bug ...Klaus wrote: hmm, too funky, how can we use a HIDDEN control, native or not?
I would consider this as a bug, although uncertain it its Apple's or Livecode's fault

Livecode controls are one thing, native another and one know nothing about the other ...
... you create a Livecode scrolling field, next you create a native scroller ...they are two different things. Is so true that you're having to operate one with the messages coming from the other ...

Is your job to handle the two object ... if you hide one, you have to hide also the other and vice versa ...

Guglielmo
Re: Disable the scroller when scrollGroup is hidden
Hmm, OK, I believe you! 

Re: Disable the scroller when scrollGroup is hidden
Just set the visible of the native scroller to false e.g. iphoneControlSet gScrollerID, "visible", "false". It doesn't work while it's visible is false.
g
g
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Disable the scroller when scrollGroup is hidden
Well, that's what I was talking about all the time!?Jellicle wrote:Just set the visible of the native scroller to false e.g. iphoneControlSet gScrollerID, "visible", "false". It doesn't work while it's visible is false.
g
Try to convince Guglielmo!

Re: Disable the scroller when scrollGroup is hidden
Klaus...
I'm not seeing what you guys are... maybe it's something in the air... but for me the scroller still scrolls when invisible... it still shows the scrollbars of the native scroller... the only way I have found to successfully stop the scroll is to set 'scrollingEnabled' to false...
I'm not seeing what you guys are... maybe it's something in the air... but for me the scroller still scrolls when invisible... it still shows the scrollbars of the native scroller... the only way I have found to successfully stop the scroll is to set 'scrollingEnabled' to false...
Re: Disable the scroller when scrollGroup is hidden
That's what's puzzling my naive mind, hidden object should act as if not being there at all!Dixie wrote:... but for me the scroller still scrolls when invisible...
So what's the use of setting a native scoller/object to INVISIBLE if it does not have any effect?
Can you enter text into an invisible native text input field? I doubt!
So this looks like a bug to me

Re: Disable the scroller when scrollGroup is hidden
Just checked and double-checked - setting the visible of the scroller control deactivates it here 
Gerry

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Disable the scroller when scrollGroup is hidden
+1Jellicle wrote:Just checked and double-checked - setting the visible of the scroller control deactivates it here![]()
Exactly the same here ...

Livecode 6.1.0 build 2005 - Commercial Edition
Guglielmo