Selecting Field in scrollGroup Causes Screen Offset

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Selecting Field in scrollGroup Causes Screen Offset

Post by jstarkman » Mon Mar 18, 2013 12:08 am

Hi LC Gurus,

I have a series of 'cells', each of which is a group containing a button, field (editable) and label. These cells are all grouped to form a scrolling group (scrollGroup). Some cells I have acting as buttons (editable field is disabled), and others I have the button disabled, so the field will be selectable and editable.

In some instances when I select a field to edit, the screen does a pixel shift of about 4 cells up and to the left. See photo attached.
image.jpg
This does not always happen. If I scroll the group a bit and then select a field, it may not happen. Other times, usually when I reopen the form, it does.

My first thought was that this was related to group margins, so I went back and set all group margins to "0". This doesn't seem to have resolved the problem. Does anybody have any ideas?

Also, I'm not sure of how the search engine on the forum works. I've tried enclosing two words in quotes to search for a string, and also tried joining with AND, but searches only seem to return the first term. Assistance is appreciated.

Thanks again,

Joel

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Selecting Field in scrollGroup Causes Screen Offset

Post by magice » Mon Mar 18, 2013 5:11 am

I'm not sure if this will help, but have you tried adding a lock screen and unlock screen to any script that is being run when the field is being selected? Also, if that part of the field is actually a button, check if auto hilite is checked in the properties. Just guessing though.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Selecting Field in scrollGroup Causes Screen Offset

Post by dunbarx » Mon Mar 18, 2013 5:27 am

Hi.

Does this happen on a mobile device, or on the desktop?

Craig Newman

jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Re: Selecting Field in scrollGroup Causes Screen Offset

Post by jstarkman » Mon Mar 18, 2013 12:37 pm

It's happening on a mobile device (iPad).

Joel

jstarkman
Posts: 47
Joined: Wed Mar 16, 2011 4:39 am

Re: Selecting Field in scrollGroup Causes Screen Offset

Post by jstarkman » Tue Mar 19, 2013 2:28 am

Well, I finally found a solution to this problem...

The scrollGroup, comprised of all the buttons and fields, resides on a graphic (background) with a navbar so that the whole affair looks like a scrolling table, and occupies a portion of the iPad screen. When a user presses a button on the side of the screen, this table slides left off the screen and is replaced by another form which slides on right-wise.

I had the layerMode of the 'table' set to "dynamic", which offered good performance for this slide in/slide out animation. I played around with this setting, and tried to leave it at "static" until a button press, then setting it to dynamic for the animation, then back to static. This generated screen artifacts which were not that pretty. Finally, I discovered that if I set the table to layerMode "scrolling", all works well.

This is not what I expected, as to me scrolling does not imply a moving window, but rather moving objects on a window. But at least it's working now. Whew! Thanks to magice for the lock/unlock clue, which sent me off thinking about such things...., as well as to others that pitched in.

Joel

Post Reply