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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

visible page frame

Status
Not open for further replies.

fishman13

Programmer
Jul 8, 2002
73
US
Is there a way to make a page in a pageframe visible only if a condition is true. I have a form with a pageframe with 12 pages. I only want page 11 visible if a condition on page 1 is true. Currently I have page 11 set to disabled and then enable on the true condition.
 
Hi

I dont think you can make that invisible and then visible with simple code.

However, you can enable the pages of a pageframe based on certain conditions.... example..

1. Create a form property say - lPageEnabled
Initialise its value as .t. or .f. based on the initial value you want.

2. In the enabled property of the relevant page.. put the code..
=ThisForm.lPageEnabled

3. In the relevant text box.. lost focus event..
ThisForm.lPageEnabled = ???? whatever.. based on the value in the textBox.
Also add teh code.. ThisForm.PageFrame1.PageN.Refresh()

suitably change the code..

Now the hard way to make a page of a pageframe invisible.. is to use REMOVEOBJECT() method to remove a page.. and use the ADDOBJECT() method to add a page and refresh the pageframe.. based on the text box value..

:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Fishman,

I agree with what Ramani said. I have adopted a similar appoach myself.

There is another option. Make all the tabs in the pageframe invisible (by setting the Tabs property to .F.). When the tabs are invisible, you have to provide another control to let the user select the page - a graphical option group is one possibility. You can then go ahead and set the corresponding option button to invisible, which would, in effect, completely hide the page in question from the user.

Mike


Mike Lewis
Edinburgh, Scotland
 
If Page 11 is to be visible or invisible once and for all then the removeobject() method is simple and perfect.

However if you need to get the page back after removing it, that's another story.......

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top