Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Allow tab switching, but no data changing
Message
 
To
13/10/2005 11:16:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01058713
Message ID:
01058719
Views:
7
>Hi all,
>
>I've got a form that uses a frame (form1.mainframe) with five tabs (form1.mainframe.tab1, etc.). Right now, I only allow access to the frame after the user clicks an Edit button on the form. At that point, they can access the frame, make edits, change tabs, etc.
>
>How could I keep things as they are (preventing access to changing the data), but allow them to switch tabs without having to click the Edit button? I want them to be able to view everything on each tab but not be able to change any of the data on the tabs unless they choose Edit.
>
>Thanks,
>
>John

Make tabs enabled=.t.

Create new Method named PageProcess
In your Init Event just put:
thisform.PageProcess(.f.)

** In Click of the Edit button
thisform.PageProcess(.t.)

** There where you exit of Edit mode
thisform.PageProcess(.f.)

*** Method PageProcess

LPARAMETERS lbEnableControls
FOR EACH oPage in thisform.PageFrame
    oPage.SetAll("Enabled", lbEnableControls)
NEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform