locked
Form clattered at design time. How to change pages? RRS feed

  • Question

  • With many controls added to a form I am beginning to sense a problem. During runtime many controls will be invisible on the first page but when subsequent pages are chosen they will appear. It is determined programmatically. I do not see an option to choose pages at design time. It would allow me to see some controls much better. In Visual dBASE Plus such convenience if taken for granted and much appreciated. How can I do it here?

    Thanks.
    Sunday, September 25, 2005 4:53 PM

Answers

  • Hi Alex,

    Just to make sure you understand, Forms don't have Pages, PageFrames do. If you want Pages then you need to add a Pageframe control to your Form. PageFrames are container objects that contain Pages. 

    Monday, September 26, 2005 8:40 PM

All replies

  • Hi Alex,

    You talk about controls on a form but then you mention "pages." Are you talking about a form that has a Pageframe and then working with controls on the pages of the Pageframe?

    On the pageframe (or any container), right-click and then choose Edit. You can choose a page to work with and then add controls to the individual pages. You can also access the pages of a Pageframe using the Combobox at the top of the Properties Sheet.

    When you drop controls on an individual page they will only appear when the page is active, either at design time or runtime.

    Sunday, September 25, 2005 6:45 PM
  • Cindy, thanks.

    I may be talking nonsense but I feel there is still a problem. The problem is the that FORM object does not have a PAGE property. I do not know if I can add it to the form by using AddProperty method or not. I will try or if you have any experience with it then I will appreciate your comment.

    The pageFrame is a separate object, it is useful here but not as much as a similar object in VdBase for instance. Over there you can change pageNo property both at design and run time for any form. All your objects on the form have a pageNo property which point to the selected pageNo of the form or in case pageNo = 0 this object will appear on every page.

    Using this property I have been able to construct forms with literally hundreds of useful controls on them. Obviously, you place a dozen of them on one page, another 20 on the next page, etc. you can select pages at design time too and change properties of individual controls without interference from others which would have overlapped them visually otherwise. This is what happening now. I placed a container on the form. It appears on the third page at runtime but at design time it is the first thing I see because it was placed last. It covers everything else I placed before.

    Can I add a pageNo property to my form and change it at design time?
    Monday, September 26, 2005 3:06 PM
  • I just added a pageNo property to my form and it compiled but I do not see it in the designer, only as a user added procedure. Thus I cannot do anything at design time anyway. At runtime I do not need it since I use pageFrame object.
    Monday, September 26, 2005 3:16 PM
  • I am beginning to think that perhaps one of your controls: PAGE can accomplish what I need. What is the difference between pageFrame and page controls anyway?

    In my TOOLBOX there are two controls: PAGE and PAGEFRAME. They look pretty much similar when placed on a form but there should be some difference. "VFP Help" is not helpful as I can see. I checked SOLUTIONS and could not find anything to explain the difference.

    Thanks.
    Monday, September 26, 2005 3:34 PM
  • I think I am getting a handle on it. I am beginning to undesrand how you change pages in VFP. It is different from what i am used to but it is OK. No more questions at this time. I have already changed my forms accordingly.

    Thanks.
    Monday, September 26, 2005 4:58 PM
  • Hi Alex,

    Just to make sure you understand, Forms don't have Pages, PageFrames do. If you want Pages then you need to add a Pageframe control to your Form. PageFrames are container objects that contain Pages. 

    Monday, September 26, 2005 8:40 PM