Best or easiest way to make a vertical scrolling area with fields and buttons

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Best or easiest way to make a vertical scrolling area with fields and buttons

Post by mrcoollion » Mon May 25, 2020 1:26 pm

Hi all,

I have too many fields and buttons on one card and I am wondering.
What is the best/easiest way to make and maintain a vertical scrolling area in my card in which I can place all the Buttons and fields I need ?

Regards,

Paul

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by richmond62 » Mon May 25, 2020 1:49 pm

Well, personally I'd just group everything and then set the Vertical scroll to true.
-
Screenshot 2020-05-25 at 15.48.15.png
Attachments
Scroller Roller.livecode.zip
Here's the stack.
(917 Bytes) Downloaded 189 times

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by mrcoollion » Mon May 25, 2020 2:18 pm

Ok, but how do I get objects past the card hight?

PS. Thanks for the tip and the sample!
Last edited by mrcoollion on Mon May 25, 2020 2:39 pm, edited 1 time in total.

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by mrcoollion » Mon May 25, 2020 2:27 pm

Found out how to put objects past the card hight (I think).

1) Make group height larger than the card (stack) height.
2) In run mode scroll up.
3) Then edit group and the area you scrolled to will be the area you can edit objects in.

Any other way's ?

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

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by Klaus » Mon May 25, 2020 4:48 pm

mrcoollion wrote:
Mon May 25, 2020 2:27 pm
way's
OUCH, this hurts! 8)

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by mrcoollion » Mon May 25, 2020 6:43 pm

Klaus wrote:
Mon May 25, 2020 4:48 pm
OUCH, this hurts! 8)
Well it would be nice if I would have been able to scroll the group in edit mode :wink:

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by FourthWorld » Mon May 25, 2020 6:54 pm

mrcoollion wrote:
Mon May 25, 2020 6:43 pm
Well it would be nice if I would have been able to scroll the group in edit mode :wink:
Does your app provide the pointer tool for your users, or are you referring to your own development work while making layouts in the IDE?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 129
Joined: Sun Feb 20, 2011 4:26 pm
Location: Vancouver Island, BC, Canada. ex.UK
Contact:

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by PBH » Tue May 26, 2020 3:49 am

You could try setting the stack scaleFactor to something like "0.75", then you can temporarily increase the depth of your stack and group for editing. Reset the size of the group and stack before setting the scaleFactor back to 1.

It does work pretty well, but be prepared for some small editing anomalies like dropping controls onto the card puts them in odd positions and you may need a good pair of glasses! 🤓

Paul

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by FourthWorld » Tue May 26, 2020 6:41 am

If you need a scrolling area of a specific size you can see the group's backsize property:
https://livecode.com/resources/api/#liv ... t/backsize
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by mrcoollion » Tue May 26, 2020 7:16 am

FourthWorld wrote:
Mon May 25, 2020 6:54 pm
Does your app provide the pointer tool for your users, or are you referring to your own development work while making layouts in the IDE?
I am referring to my own development work while making the layouts in the IDE.

Thanks Klaus, Paul and Richard for the great tips.

cpuandnet
Posts: 32
Joined: Thu Jan 17, 2019 6:43 am

Re: Best or easiest way to make a vertical scrolling area with fields and buttons

Post by cpuandnet » Tue May 26, 2020 4:23 pm

mrcoollion wrote:
Mon May 25, 2020 6:43 pm
Klaus wrote:
Mon May 25, 2020 4:48 pm
OUCH, this hurts! 8)
Well it would be nice if I would have been able to scroll the group in edit mode :wink:
Open your message box and use the following command to scroll the group.

Code: Select all

set the vScroll of group "yourGroupName" to 100
The number you use (100 in this example) is really a hunt and peck method until you scroll to the area you desire. LC will automatically set the vScroll value to the max value if you try and use a number larger than the max. You can find the max vScroll value by executing the following command in the message box.

Code: Select all

put the formattedHeight of group "yourGroupName" - the height of group "yourGroupName"
This assumes you already have controls past the height of the group using one of the previously mentioned methods.

Post Reply

Return to “Talking LiveCode”