Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Page of Pagframe be Modal

Status
Not open for further replies.

white605

Technical User
Jan 20, 2003
394
US
windowstate property of form allows the choice of modal

Is there a like property of a page in a pageframe, if so im missing it completely. or can the visible property of the page be used to do the same thing?

My ultimate goal is to "stick" the user on a page until they click an update button with tableupdate in the click event.

thanks
wjwjr
 
Hello wjwjr,

unusual, but you could do several things: Hide the pageframes tabs (pf.tabs=.f.), you can define your own property "Stickypage" and store the pagenumber, then set pf.activepage to that page in each page.Activate() event,
you may try to set all other's page.enabled=.f. and you may try RETURN .F. or NODEFAULT from page.Deactivate() under the condition of Page.isSticky=.T.; it's not documented in the help, but it may prevent the activepage to change.

Bye, Olaf.
 
Create a property on the form, call it "whichpage" set its default to 0

When the user is on the page you want him to "stick", set whichpage to that page number.
thisform.whichpage = thisform.pageframe1.activepage

Once the update is done in the button click(), set whichpage to 0

In All Pages in the pageframe Activate() put the following:

If Not Empty(Thisform.whichpage)
This.Parent.ActivePage = Thisform.whichpage
Endif
This.Refresh


 
You may try to put your code with NODEFAULT in Page Deactivate event, but it will become a bit tricky. We were wrestling with this problem in my previous job and we finally got a solution, though still having problems if you use navigation keys (right/left arrows).

Perhaps using tabless pageframe in Wizard-like style is a much simpler idea.
 
I've done this often, and accomplish it by simply disabling the other pages (one of Olaf's suggestions). This way it's visibly obvious to the user that he's stuck on the current page.

Jim
 
I've also achieved this by setting the other pages' Enabled to .F. But I wonder if the original questionner wants to go beyond that ... to disable the entire user interface, apart from the active page? If that's the case, Ilyad's idea of NODEFAULT in the Activate sounds plausible.

However, this is a very non-standard approach, and could lead to complications. It would be much simpler to do the editing in a modal form, rather than to try to make the page modal.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
However, this is a very non-standard approach
After tinkering with it I agree that this in not standard, so I either disable and make the pages invisible or just call another modal form for the edit which is much simpler and cleaner.
Thanks for all the replys
wjwjr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top