Good day All
I have been trying to get my head around this small little problem with no luck.
I would really appreciate it if someone can help me with this.
I have added a sample stack to explain the problem I'm experiencing.
In the stack I have a group with fields and graphics, there is also buttons in the
stack, the buttons are not part of the group. On the properties of the group
I have ticked the boxes for Horizontal and Vertical scrolling.
The horizontal scroller is working perfectly, as the field with graphics and
the fields on top (that is numbered) scrolls together. The buttons on the left
are not scrolling with the group and that is correct for the solution I need.
When you use the Vertical scroller everything works as expected. The
field with graphics and the fields on the top scrolls vertically as per normal.
However this is where I only need the the field with graphics and the buttons
on the left to scroll together vertically and the fields that is numbered on
top needs to remain where it is without scrolling vertically.
I hope this makes sense....? What I'm trying to achieve...
I have tried to create another group with the buttons and the field with
graphics together, but I cant get the exact result I need.
Is there any other way of adding a scrollbar that will give me the effect I need?
I need the scrollbars to be as showed in the example, grouping it differently puts
the vertical scrollbar at the end of the field and that defeats the purpose
of what I need the solution for.
I sure there is a simple solution that I have overlooked....
Kind regards
Mills
Getting scrollbars to work in a specific way
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Getting scrollbars to work in a specific way
- Attachments
-
- SampleScroller.zip
- My Scrolling sample
- (776 Bytes) Downloaded 271 times
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Getting scrollbars to work in a specific way
Hi Mills,
If I understand you correctly, something like this is what you want
It's not perfect but you can work out the exact numbers.
grc red is the red rectangle in your stack (could be anything in the group). btn 1 is the top button.
You can see that only left/right in the location of the button is changing, item 2 always stays the same.
Make sense?
Simon
If I understand you correctly, something like this is what you want
Code: Select all
on scrollbarDrag
put the loc of btn 1 into tLoc
set the loc of btn 1 to item 1 of the loc of grc "red", item 2 of tLoc
end scrollbarDrag
grc red is the red rectangle in your stack (could be anything in the group). btn 1 is the top button.
You can see that only left/right in the location of the button is changing, item 2 always stays the same.
Make sense?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Getting scrollbars to work in a specific way
Hi Mills,
If I understand you correctly, something like this is what you want
It's not perfect but you can work out the exact numbers.
grc red is the red rectangle in your stack (could be anything in the group). btn 1 is the top button.
You can see that only left/right in the location of the button is changing, item 2 always stays the same.
Make sense?
Simon
If I understand you correctly, something like this is what you want
Code: Select all
on scrollbarDrag
put the loc of btn 1 into tLoc
set the loc of btn 1 to item 1 of the loc of grc "red", item 2 of tLoc
end scrollbarDrag
grc red is the red rectangle in your stack (could be anything in the group). btn 1 is the top button.
You can see that only left/right in the location of the button is changing, item 2 always stays the same.
Make sense?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 129
- Joined: Sun Feb 20, 2011 4:26 pm
- Location: Vancouver Island, BC, Canada. ex.UK
- Contact:
Re: Getting scrollbars to work in a specific way
Hi Mills,
If I understood you correctly the attached stack should work OK.
Basically I separated the controls into three groups, one main group for the grid, one group for the buttons and one group for the fields. I added graphic boxes to the button and field groups to make their size match the main group (these are coloured grey in the sample), then I scripted the main group to make the two other groups follow in the direction of the grid as required. i.e. The button group only scrolls vertically and the field group only scrolls horizontally.
Just turn off the 'opaque' property of the grey graphics to hide them.
Hopefully that will all make sense when you look at the sample.
Paul
If I understood you correctly the attached stack should work OK.
Basically I separated the controls into three groups, one main group for the grid, one group for the buttons and one group for the fields. I added graphic boxes to the button and field groups to make their size match the main group (these are coloured grey in the sample), then I scripted the main group to make the two other groups follow in the direction of the grid as required. i.e. The button group only scrolls vertically and the field group only scrolls horizontally.
Just turn off the 'opaque' property of the grey graphics to hide them.
Hopefully that will all make sense when you look at the sample.
Paul
Re: Getting scrollbars to work in a specific way
Hi Simon & Paul
Thank you for the prompt response!
The solutions you guys gave are exactly what I needed. I was so caught up in the problem that I overlooked the simplest solutions.
Thanks once again for the help, really appreciate it! You saved me from growing a few extra grey hairs...
Regards
Mills
Thank you for the prompt response!
The solutions you guys gave are exactly what I needed. I was so caught up in the problem that I overlooked the simplest solutions.
Thanks once again for the help, really appreciate it! You saved me from growing a few extra grey hairs...
Regards
Mills