Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
Edit Control Causing Scrolling. |
Fri, Jun 25 2021 9:09 PM | Permanent Link |
Steve Gill | I have a form that has is longer than the vertical screen size, ie. the whole form doesn't fit on the screen. It has scroll bars so the user can scroll the page.
On the bottom part of the form, there is an HTML form for the user to fill in. When the application starts, the form scrolls to the first TEdit in the form and gives it focus. To get around this I had to add a timer, and add the following to the OnTimer event: Timer1.Enabled := False; Application.Viewport.ScrollTop := 0; Using Self.ScrollTop or frmMain.ScrollTop doesn't work. My question is, is there another way to do this that doesn't involve a timer? Using this code in the Form's OnShow event doesn't work. It would be great if there was an event that fired when everything had finished loading. Thanks. = Steve |
Sat, Jun 26 2021 7:22 AM | Permanent Link |
StewCam | To scroll the form to the top you could try calling scroll asynchonously using a procedure. Have a look at the post by Raul:
https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=10455#10455 >Steve Gill wrote: > >I have a form that has is longer than the vertical screen size, ie. the whole form doesn't fit on the screen. It has scroll bars so the user can scroll the page. > >On the bottom part of the form, there is an HTML form for the user to fill in. > >When the application starts, the form scrolls to the first TEdit in the form and gives it focus... |
Tue, Jun 29 2021 1:20 AM | Permanent Link |
Steve Gill | << To scroll the form to the top you could try calling scroll asynchonously using a procedure. Have a look at the post by Raul:
https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=10455#10455 >> Thanks Stew (and Raul). I did a search previously and didn't find that thread. Works great. = Steve |
Thu, Aug 5 2021 6:48 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< I have a form that has is longer than the vertical screen size, ie. the whole form doesn't fit on the screen. It has scroll bars so the user can scroll the page. On the bottom part of the form, there is an HTML form for the user to fill in. When the application starts, the form scrolls to the first TEdit in the form and gives it focus. >> Just use this line in your main form's AutoCreate (or in the project's .dpr code): Application.AutoFocus:=False; You *will*, however, then need to set focus to whatever control you want to have focus in the form's OnShow event handler. More information: https://www.elevatesoft.com/manual?action=viewprop&id=ewb3&comp=TApplication&prop=AutoFocus Tim Young Elevate Software www.elevatesoft.com |
Fri, Aug 6 2021 6:14 PM | Permanent Link |
Steve Gill | << Just use this line in your main form's AutoCreate (or in the project's .dpr code): Application.AutoFocus:=False; You *will*, however, then need to set focus to whatever control you want to have focus in the form's OnShow event handler. >> Nice. Thanks Tim. = Steve |
This web page was last updated on Thursday, December 12, 2024 at 02:38 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |