Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Back to Basics - Record Navigation Bar
Message
From
29/12/1997 12:32:24
 
 
To
29/12/1997 10:30:47
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00068139
Message ID:
00068253
Views:
27
>>>>>I have a form which is having pageframe which consists of 6 pages.
>>>>>
>>>>>Some of the pages are having grids, some are having text boxes..
>>>>>
>>>>>Now depending on the page, I'm setting up the control on the 1st item, when user selects add/edit & based on that enable/disable the controls..
>>>>>
>>>>>My problem is :
>>>>>
>>>>>1. I have 6 add/edit bars for every page, which I want to make one..
>>>>>2. Pageframe refresh is also giving problem, sometimes..
>>>>>3. Form loading is very slow..
>>>>>
>>>>>As this is a very basic thing.. Is there any record navigator & adding/editing toolbar avl. which can be used..
>>>>>
>>>>>Or any ideas to improve my one..
>>>>
>>>>Vinod, do I understand correctly that you wish to add/edit each page? and that is why you have 6 add/edit bars (buttons?)
>>>>
>>>>1. What you could do is to add a couple of form properties. In one store the active page and in another the first control. Update these properties in the Activate Page method, so that as you move from one page to another the correct properties are available. Expand this idea to keep all the data you need.
>>>>
>>>>2. Problems with speed or with old data showing? If the second, then be sure you have "thispage.refresh" in the ACTIVATE code for each page. Data changed since the last time you saw a page is NOT updated automatically.
>>>>
>>>>3. Form loading is slow because there are so many controls in a 6-page page frame. You can put all the controls on each page into a container, and only instanciate the container the first time the user clicks on a page. This is a good idea if the user only looks at one or two pages most of the time.
>>>>
>>>>If you wish to load all the page information when the user opens the form, then try adding wait-windows showing the user what's happening
>>>>
>>>>Wait Window "Starting Page 1" nowait in the Page 1 INIT, etc.
>>>>It won't make the loading go faster, but the user sees that the program is working hard and doesn't mind as much :-)
>>>>
>>>>HTH
>>>>Barbara
>>>
>>>
>>
>>Hi Vinod,
>>Barbara has already outlined it very well. I wanted to clarify a few things for you.
>>
>>>Thanks a Lot !! Your suggestions are very helpful, but I have questions for the same :-
>>>
>>>1. The first one is a very good idea and I'll start modifying my form by adding necessary properties etc.
>>>
>>>2. Thispage.refresh in activate is already there..
>>>
>>>3. Form loading is slow, but pls excuse me as I'm not able to understand you fully.. how to instanitate container...etc.
>>After creating the contents of a page save it as class (it will typically be a container). On activate event of pageframe put a code like this :
>>
>>wait window nowait "Pls wait a moment"
>>if type("this.myPageFrameClass1") = "U" && Page is activated first time
>>   this.addobject("myPageFrameClass1","myPageFrameClass1")
>>   this.myPageFrameClass1.visible = .t.
>>endif
>>
>>
>>>I i don't want to load all the pages, if there is anything which can fasten up the process or say load only 1-2 main pages, It will be very helpful.
>>For you use a loading method in page.activate pageframes other tahn page1 will be empty on startup leading a faster form load.
>>
>>>Regarding wait messages, Previously I put the messages in Init method, but what happens is Initial loading takes very long and then Init msgs. in each page flashe quickly..
>>So in sequence wait messages would shift to belonging pages.
>>
>>>Any tip to show progress step by step, so my user can come to know that my program is really working....:)
>>Would be fast enough I think. My similar pages even don't need a message (some of them contain over 80 objects in a container class - of course not tested on a 386, 486).
>>
>>>Pls note that I'm using VFP 3.0b
>
>
>I'm sorry to ask you again & again for small things...But pls help me on this..
>
>Currently I have that form of 6 pages saved as a scx file,
>
>which I'll save it as a class now...
>
>After saving it as a class, How I can call it ??
>
>Actually this 6 page form I want to load on the basis of accesslvl of user...
>
>Say if a user is allowed to acess pages 1, 3, 5
>
>The form at the start should only load 1st page, but as tabs displays 3 & 5..
>
>When he clicks on 3rd or 5th page, the program should load 3rd page or 5th..
>
>Pls tell me how I can do this thing...

Here's how I would do it:
1. modify the form (not the form class) && see step 4 for reason
2. edit page 3
3. select all controls (ctrl+A)
4. (in the menu) file/save as class && not available if modifying a class
5. choose "selected controls"
6. name it as "page3"
7. delete all controls from page 3 && this prevents it from loading
8. in page3.activate() put:
. if UserAllowedToEditPage3() and type('this.page3')='U'
. this.addobject("page3","page3")
. this.page3.visible = .t.
. else
. this.refresh()
. endif

do the same kind of thing with each page.

Bill
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform