Group Scrolling

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Group Scrolling

Post by jwtea » Fri May 25, 2018 1:59 am

Hello everybody,

i got a group with a scrollbar in card 1 and everytime i scroll the scrollbar to the bottom and when i go to card 2 then go back the card 1, the scrollbar is still in the same position....

How can i make it to the top when i re-enter the card??

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Group Scrolling

Post by bogs » Fri May 25, 2018 7:03 am

Not on a dev machine, but off the top of my head wouldn't it be something like (psuedo code) -

Code: Select all

on openCard
	set the thumbPosition of scrollbar x to 0
end openCard
Image

jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Re: Group Scrolling

Post by jwtea » Fri May 25, 2018 7:15 am

Hello bogs, thanks for your reply!

How to know my name of the scrollbar in my group???

As i just go to the group's property and tick "Vertical Scrollbar" ~ ~ ~

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Group Scrolling

Post by Klaus » Fri May 25, 2018 10:01 am

Hi jwtea,

the "build-in" scrollbars of objects (fields and groups) do not have a name of their own.
I think in your case you need to reset THE SCROLL (VSCROLL or HSCROLL) of the group!

You need something like this:

Code: Select all

on preopencard
  set the VSCROLL of grp "your group here" to 0
end preopencard
Best

Klaus

jwtea
Posts: 66
Joined: Fri Mar 23, 2018 2:01 am

Re: Group Scrolling

Post by jwtea » Fri May 25, 2018 10:15 am

Hello Klaus,

THANKS!!! you solved my problem :D 8)

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Group Scrolling

Post by bogs » Fri May 25, 2018 3:37 pm

Sorry jwtea, Klaus has it right, I misunderstood the question. Thanks Klaus :D
Image

Post Reply

Return to “Talking LiveCode”