Page 1 of 1

Newbie: Scrolling question

Posted: Tue Jun 12, 2007 8:42 pm
by kpeters
I nocticed that window moving & scrolling on Macs is quite different from Windows and again quite different comparing RR to the design tools/languages I use on Windows.

Having a stack window wider & higher than the screen on some machines my app will need to run on:

How do I make it scrollable, both on the x and y axis?

As always, thanks in advance for any help/pointers.

Kai

Posted: Tue Jun 12, 2007 9:21 pm
by xApple
I made a card scrollable vertically once simply by grouping all the controls it had in one big group called "allTheStuff" and adding a scroll bar on it's side (the only object not contained in the big group). Finally, put this script in the scrollbar:

Code: Select all

on mouseUp
  global scrollMax, myStartPosition
  put scrollMax*((the thumbPosition of me)/(the endValue of me)) into myNewPosition
  set the top of group "allTheStuff" of cd "debugInfo" to myStartPosition-myNewPosition
end mouseUp
Set the global variables when the stack opens:

Code: Select all

on openStack
  global scrollMax,  myStartPosition
  put 1000 into scrollMax
  put 5 into myStartPosition
  set the top of group "allTheStuff" of cd "debugInfo" to myStartPosition
  set the thumbPosition of control "myScrollBar" of cd "debugInfo" to 0
end openStack
I'm sure you'll manage to generalize it for vertical and horizontal scrolling ;)

But in general if your interface requires more space than the real estate the screen provides; it's your interface that has a problem not the screen.

Posted: Tue Jun 12, 2007 10:35 pm
by kpeters
Thanks, xApple ~

that sounds like a solution I could work with. Just tried it in a simple demo but it does not work as expected - too much of a newbie?

Would you mind sending me a minimalistic demo stack off list to
platysternon@hotmail.com?

TIA,
Kai

Posted: Wed Jun 13, 2007 3:25 pm
by xApple
Ok I made an exemple.
But again you never should need to scroll a card.
Just type this in your message box and hit enter:

Code: Select all

go URL "http://homepage.mac.com/xapple/give/scrollingstack.rev"