Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-page forms
Message
From
22/05/1998 08:53:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/05/1998 17:16:32
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00100411
Message ID:
00101123
Views:
28
>Our application requires several pages of data to be entered from a loan application form. In order to accomodate all of the data, we have nested page frames that the user will access by clicking next and previous buttons. However, the customer requires the application be written for 640 x 480 resolution which increases the number of pages tremendously. We are looking for alternative ways to handle this large amount of data. Any suggestions?

I've done things like that in FPD - I've had a window in a window, where the inner window was actually larger than the window it was seen through. In the When function of each field I've checked its position (an easy task in VFP now, and in FPD I've eased it on myself by using array variables, and extracted the index from varr() function), and moved the inner window so the field is visible.

What I'd try to do in this situation would be a creation of a tall pageframe within a normal sized pageframe, and having all controls in it call a custom method in GotFocus, and this method would just make sure the control is within the visible portion of the inner frame, and adjust its position if necessary. I just wish days were 48 hours long, maybe I'd do it myself then.

...OK, OK, I _had_ to try it. I've played around the form designer for some fifteen minutes, and it simply works like a charm - I've added a pageframe to a form, clicked Edit, added another pageframe, selected its Page1 (I've set .pagecount=1, .tab=.f. to both outer and inner pageframe) and added a couple of controls. Then I've started changing the inner frame's .top from -9 to 4, and watched it swing up and down. The inner frame is some four times taller than the outer one. Now writing such a method for the form is a piece of cake - it should set

* form.scrollPage method
Lparameter ThisControl
ThisForm.Pageframe1.Page1.Pageframe1.top=-thiscontrol.top+45

...or something like that (needs playing around - 45 pixels from the top seemed a good distance to start with). Each object should pass a reference to itself as a parameter. Of course, the playing around should include writing some check to see if Thiscontrol is already in the visible part of the page, to avoid unnecessary scrolling. You may want to add some slider control, or buttons to access various regions of this form. Have fun all day, but I feel the result will be far more useful (and require less clicking on the user's side) than having multiple pages.

Gee, I like this :) One of those days when Fox surprises you, or rather you surprise yourself with how much you can do with just a little bit of code. You don't even need a 48-hour day.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform