Page 1 of 1

Scrollbar without group

Posted: Mon Sep 01, 2014 10:17 pm
by jalz
Hello all,

Is it possible to add a scrollbar to a card which is 800px high and allow the user to scroll up and down that page without having to group items on the card? I know how to group items and apply a scrollbar, but I really would like to add a native scrollbar from the palette and not a scrollbar via the group.

Thanks
Jalz

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 12:55 pm
by Klaus
Hi Jalz,

if that "native" scrollbar is scripted correctly, there should be no problem :D


Best

Klaus

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 6:04 pm
by jalz
Hi Klaus,

Thanks for that. Any resources you can point me towards on how to do this? Tried the usual google and forum searches, but the grouped scrollbar method turns up.

Best
Jalz

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 6:11 pm
by Klaus
Are we talking about MOBILE?
If yes, please always note this first, thanks! 8)

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 6:16 pm
by Klaus
If we ARE talking about mobile, please make a search for "native scroller" in the mobile section!
This has come up about 100000000000 times before :D

There is even a Livecode tutorial about this that you can modify to your needs:
http://lessons.runrev.com/m/4069/l/9441 ... ll-a-field

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 6:20 pm
by jalz
Hi Klaus,

No we're talking about normal desktop. I'll check out the link you've given to me.

Cheers
Jalz

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 6:48 pm
by Klaus
jalz wrote:No we're talking about normal desktop. I'll check out the link you've given to me.
AHA! :D

OK, we cannot have a "native mobile scroller" on the desktop, so the lesson will not be of much use for you in this respect.

AND on the desktop a "custom" scrollbar will not look any different than the groups scrollbar,
so adding a scrollbar to the group is the way to go on desktop systems!

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 7:49 pm
by jalz
Yeah, I figured that, no way around it so I've gone for the grouped scrollbar.

Another question, how do I script the group object enlarging/reducing when I change the size of the window. I kind of want the script equivalent of the geometry when you can fix the right and bottom position.

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 10:07 pm
by jalz
I've almost got it to behave like I want. I decided to use on on resizestack after a bit of research and can stretch the grouped object keeping the scrollbars on the edge of the card. However its all a little 'messy'. The grouped object seems to move slightly when I move when I resize the card and scrollbars on occasion go off screen. Anyone help me make it behave like a traditional window with scrollbars?

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 10:15 pm
by Klaus
Hi Jalz,

either add a "lock screen" or simply do:

Code: Select all

on resizeStack cardWidth, cardHeight
   set the rect of group "grp" to the rect of this cd
end resizeStack
No flickering! :D


Best

Klaus

Re: Scrollbar without group

Posted: Tue Sep 02, 2014 10:27 pm
by jalz
Thank you :D