Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Help Needed with Scroll issue
Tue, Jan 22 2019 8:32 PMPermanent Link

Mic Thurber

Software for Ministry

Hi EWB community,

I need some advice on how to solve a (I hope) minor issue. While there are several additional forms in my app, I am adding two as attachments so that you can perhaps spot the issue.

The app is sized to look right on an iPhone 6 and later, so its size may look a little odd in the EWB2 app.

The Login form is my app's main form. It is not meant to be scrollable. The other form, PersonalInfo is a form that IS meant to be scrollable. I have attached a TXT file with .WBF code from both forms inside.

On the Login form, I am using a TBasic panel, and the PersonalInfo form uses a TScrollPanel.

The odd thing I'm trying to fix is that the PersonalInfo form will only scroll to the extent of the height set on the main form, the Login form. So even if I set the PersonalInfo form to the height it needs to incorporate all the components that need to be on that form, you cannot scroll down to see any components past the height of the Login form. To see all the components in a scroll in the PersonalInfo form, I have to set the height of the Login form to match that of the PersonalInfo form. Only if I set the Login form's height to match the height of the PersonalInfo form does the PersonalInfo form scroll properly. The odd thing is that Login form also scrolls, even though the form itself is NOT set to scroll.

I'm hoping it's just a simple matter of a property on one or both of these forms that I've set incorrectly.

If you want to see the actual app in use, I have set it up as a test on a server you can access. To see it (and it would be best to see this on your phone, but you can also see the effect on your desktop), go to:

sfm-server.dyndns.org/cmdphone.html

Once there, use staffmemb as the user name, and forstaff as the password. Once you have logged in, you will see a list of names. The first name on the list is already selected, so just tap View. Once at what I call the "basic" form where it shows the name in context with their family members, you'll see a button that says Personal Info just under the grid. Tap that button, and you'll see the Personal Info page that should scroll. It should scroll all the way down until you see the Comments button.

If you wish, you can also see the Login form scrolls, too, though there's nothing on the form below where the box is that identifies which church this is from.

I have a second question, too, if you are interested. At the bottom of the Personal Info form is the comments button. If you tap it, a comments page opens up on top of the Personal Info page. The problem is that you have to scroll back up to the top of the Personal Info form in order to see the Comments page.

So the question is, is there a way to make the comments form show at the bottom of the underlying Personal Info page so that you don't have to scroll back up to the top to see it, or is there a way to force the underlying Personal Info page to scroll back up to the top before showing the comments page?

Thanks, Tim, for such a great tool! And thanks, EWB community for any help you can offer.

Mic Thurber
Software for Ministry



Attachments: AppCode.txt
Wed, Jan 23 2019 3:43 AMPermanent Link

Matthew Jones

Mic

I don't have time to dig deep, but when I was working in small screens, I think I had to set the ScrollTop (or whatever it is) property to zero after setting things up, because the HTML would sometimes scroll itself. Manually setting it put it back to normal. No idea if it is relevant, but it's my suggestion.

--

Matthew Jones
Fri, Jan 25 2019 11:10 AMPermanent Link

Mic Thurber

Software for Ministry

Thanks for the thought, Matthew. I appreciate your response. I'm not sure where that property is, though. I can't seem to find on that looks like that either for the form itself or the TScrollPanel. Any other thoughts?

Thanks.
Sat, Jan 26 2019 8:54 AMPermanent Link

DFL

Mic, i am very new to EWB, so not sure how much help I can give, but my first thought would be to open your Personalinfo form as a standalone form and see if the scrollbar works properly when it is not being opened from another form.  That way you will at least know you have your page set up correctly.  If that works, I would then go back to your original program and try switching between show and showmodal to see if that helps the behavior any.

Mic Thurber wrote:

Hi EWB community,

I need some advice on how to solve a (I hope) minor issue. While there are several additional forms in my app, I am adding two as attachments so that you can perhaps spot the issue.

The app is sized to look right on an iPhone 6 and later, so its size may look a little odd in the EWB2 app.

The Login form is my app's main form. It is not meant to be scrollable. The other form, PersonalInfo is a form that IS meant to be scrollable. I have attached a TXT file with .WBF code from both forms inside.

On the Login form, I am using a TBasic panel, and the PersonalInfo form uses a TScrollPanel.

The odd thing I'm trying to fix is that the PersonalInfo form will only scroll to the extent of the height set on the main form, the Login form. So even if I set the PersonalInfo form to the height it needs to incorporate all the components that need to be on that form, you cannot scroll down to see any components past the height of the Login form. To see all the components in a scroll in the PersonalInfo form, I have to set the height of the Login form to match that of the PersonalInfo form. Only if I set the Login form's height to match the height of the PersonalInfo form does the PersonalInfo form scroll properly. The odd thing is that Login form also scrolls, even though the form itself is NOT set to scroll.

I'm hoping it's just a simple matter of a property on one or both of these forms that I've set incorrectly.

If you want to see the actual app in use, I have set it up as a test on a server you can access. To see it (and it would be best to see this on your phone, but you can also see the effect on your desktop), go to:

sfm-server.dyndns.org/cmdphone.html

Once there, use staffmemb as the user name, and forstaff as the password. Once you have logged in, you will see a list of names. The first name on the list is already selected, so just tap View. Once at what I call the "basic" form where it shows the name in context with their family members, you'll see a button that says Personal Info just under the grid. Tap that button, and you'll see the Personal Info page that should scroll. It should scroll all the way down until you see the Comments button.

If you wish, you can also see the Login form scrolls, too, though there's nothing on the form below where the box is that identifies which church this is from.

I have a second question, too, if you are interested. At the bottom of the Personal Info form is the comments button. If you tap it, a comments page opens up on top of the Personal Info page. The problem is that you have to scroll back up to the top of the Personal Info form in order to see the Comments page.

So the question is, is there a way to make the comments form show at the bottom of the underlying Personal Info page so that you don't have to scroll back up to the top to see it, or is there a way to force the underlying Personal Info page to scroll back up to the top before showing the comments page?

Thanks, Tim, for such a great tool! And thanks, EWB community for any help you can offer.

Mic Thurber
Software for Ministry
Mon, Jan 28 2019 4:25 AMPermanent Link

Matthew Jones

Mic Thurber wrote:

> Thanks for the thought, Matthew. I appreciate your response. I'm not sure where that property is, though. I can't seem to find on that looks like that either for the form itself or the TScrollPanel. Any other thoughts?

ScrollTop is a property of TControl, and might not be on the IDE - you have to code it.


--

Matthew Jones
Fri, Feb 8 2019 12:29 PMPermanent Link

Mic Thurber

Software for Ministry

Thanks. Will give that a try.


"Matthew Jones" wrote:

Mic Thurber wrote:

> Thanks for the thought, Matthew. I appreciate your response. I'm not sure where that property is, though. I can't seem to find on that looks like that either for the form itself or the TScrollPanel. Any other thoughts?

ScrollTop is a property of TControl, and might not be on the IDE - you have to code it.


--

Matthew Jones
Fri, Feb 8 2019 12:30 PMPermanent Link

Mic Thurber

Software for Ministry

I will try this also. Thanks.

DFL wrote:

Mic, i am very new to EWB, so not sure how much help I can give, but my first thought would be to open your Personalinfo form as a standalone form and see if the scrollbar works properly when it is not being opened from another form.  That way you will at least know you have your page set up correctly.  If that works, I would then go back to your original program and try switching between show and showmodal to see if that helps the behavior any.

Mic Thurber wrote:
Sat, Feb 9 2019 12:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mic,

<< I need some advice on how to solve a (I hope) minor issue. While there are several additional forms in my app, I am adding two as attachments so that you can perhaps spot the issue. >>

You need to give us much more information that you're giving us.  For example, how to do you have the Application Viewport and Surface set up ?  Are you modifying any size or layout properties in code ?  What version of EWB are you using (there have been several bug fixes for scrolling) ?

I *can* answer the question regarding the comments dialog: when the user clicks on the Comments button, the current focus is at the *bottom* of the viewport.  However, the comments dialog is positioned at the *top* of the application surface.  Therefore, the browser will, without any input from EWB, scroll the browser viewport just enough to see the active control in the comments dialog when it is displayed.  To *force* the browser viewport to scroll to a specific position, you have to use this property:

https://www.elevatesoft.com/manual?action=viewprop&id=ewb2&comp=TViewport&prop=ScrollTop

and you should be able to set it in the OnShow event handler for the comments dialog.

What I would suggest is that you start with a clean slate and work with a single form, trying to do what you want. Then, slowly start adding forms and making sure that the application still behaves as you want it.  As you encounter issues, post them here and we'll try to help.  But, as things currently are, you're just posting your application code and asking us to fix it for you.  You need to distill things down into more specific, concrete questions that are answerable via the support forums.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Apr 16 2019 7:09 AMPermanent Link

DFL

Mic, just curious if you ever got this to work?



Mic Thurber wrote:

I will try this also. Thanks.

DFL wrote:

Mic, i am very new to EWB, so not sure how much help I can give, but my first thought would be to open your Personalinfo form as a standalone form and see if the scrollbar works properly when it is not being opened from another form.  That way you will at least know you have your page set up correctly.  If that works, I would then go back to your original program and try switching between show and showmodal to see if that helps the behavior any.

Mic Thurber wrote:
Fri, May 10 2019 4:10 PMPermanent Link

Mic Thurber

Software for Ministry

DFL:

Sorry for the late reply. Been about other things for a while, including some pressing family matters.

No, I have never got this to work. I've tried setting the ScrollTop to 0 on the form coming up's OnShow event, on the Basic Panel of the form (just to try it), and also on the calling form, which was scrolled down a bit to get to the button that called up the form that needed to be scrolled back to the top.

Thanks for your kindness in asking.

And thanks, Tim, for your kindness in trying to help.

I had actually tried ScrollTop before with no success, but tried it again. Perhaps I'm not setting that property to the correct control.

Mic

DFL wrote:

Mic, just curious if you ever got this to work?



Mic Thurber wrote:

I will try this also. Thanks.

DFL wrote:

Mic, i am very new to EWB, so not sure how much help I can give, but my first thought would be to open your Personalinfo form as a standalone form and see if the scrollbar works properly when it is not being opened from another form.  That way you will at least know you have your page set up correctly.  If that works, I would then go back to your original program and try switching between show and showmodal to see if that helps the behavior any.

Mic Thurber wrote:
Page 1 of 2Next Page »
Jump to Page:  1 2
Image