I have a card with a number of text input fields. Everything on the card can be scrolled. I have a button that goes to the next card when all input is completed.
When I come back to the scrollable card everything has been scrolled to a completely different position.
How can I lock the scrolled position such that all fields are in the original position when I come back to the card?
Tom
Scrolling Controls
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Scrolling Controls
Hi.
Certainly there are many ways to store the "scroll" of the several fields (this is a property of those fields) and reset that scroll when you navigate back to the card. But there should be no reason to have to do this. The scroll will stick during navigation. Something else is changing the value(s) of that property. Are you sure no other handler is doing this?
Investigate, please. If for no other reason that to learn more LC, I will be happy to discuss methods of doing the restore thing if you want to. Read up on custom properties, and think about the "openCard" and "closeCard" messages.
Craig Newman
Certainly there are many ways to store the "scroll" of the several fields (this is a property of those fields) and reset that scroll when you navigate back to the card. But there should be no reason to have to do this. The scroll will stick during navigation. Something else is changing the value(s) of that property. Are you sure no other handler is doing this?
Investigate, please. If for no other reason that to learn more LC, I will be happy to discuss methods of doing the restore thing if you want to. Read up on custom properties, and think about the "openCard" and "closeCard" messages.
Craig Newman
Re: Scrolling Controls
If I am understanding correctly, I think this is the problem. If you are actually moving the button, than it is no longer taken into the scroll bar's calculations. Instead of moving it, you might try copying it and changing the visibility. Another option might be to leave something else in it's place or lower such as a simple graphic line.trags3 wrote: I have a button that goes to the next card when all input is completed.
Re: Scrolling Controls
Hmm.
Maybe I am misunderstanding.
Are your controls grouped? And does the group itself scroll? Or is it as you originally posted, that several scrolling fields are to have data entered into them, and then a button sends the user somewhere?
If the first, then you well may need, as Magice points out, to set the value of the scroll of the group in a custom property, perhaps on "mouseEnter" in that button, and restore it when you return.
Craig
Maybe I am misunderstanding.
Are your controls grouped? And does the group itself scroll? Or is it as you originally posted, that several scrolling fields are to have data entered into them, and then a button sends the user somewhere?
If the first, then you well may need, as Magice points out, to set the value of the scroll of the group in a custom property, perhaps on "mouseEnter" in that button, and restore it when you return.
Craig
Re: Scrolling Controls
Craig and Magice, Here is what is happening on closer inspection. I have 2 buttons on card 2 that are part of the scrolled group which are located at the bottom of the card. the lower right takes me to the next card while the lower left takes me to the previous card. The card 3 has the same 2 buttons and function. When I navigate from card 3 back to card 2 my finger is on the lower left side of the screen and the "Next button moves to where I am touching or last touched. I guess the solution is to make sure the navigation buttons are not scrolled.dunbarx wrote:Hi.
Certainly there are many ways to store the "scroll" of the several fields (this is a property of those fields) and reset that scroll when you navigate back to the card. But there should be no reason to have to do this. The scroll will stick during navigation. Something else is changing the value(s) of that property. Are you sure no other handler is doing this?
Investigate, please. If for no other reason that to learn more LC, I will be happy to discuss methods of doing the restore thing if you want to. Read up on custom properties, and think about the "openCard" and "closeCard" messages.
Craig Newman
Thanks for your help.
Tom