Tip

R5 Tab Simulation In 4.X

I tried to change all sections to Tabs. The problem I had with tab is that I
could not do field level validation within a field on a tab based on fields
under other Tabs. Sections are irritating when you have to scroll down a no. of
entries and enter field values. So, I tried something different. To combine
Notes given section and simulate button based TABs.
For this to work, use an environmental variable to store the value which will
be used to make sections visible / invisible.
To test this code do the following :

Create 2 Controlled Access Sections Section 1 and Section 2. Create 2 hotspot
buttons Button1 and Button2. Insert the following piece of code in both of them.

Diim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument

Set uidoc = workspace.CurrentDocument

Call session.SetEnvironmentVar( "Section", "Button1" ) and "Button2" in the
second button.
Call uidoc.RefreshHideFormulas

In the Postopen event of the form set the environment variable Section to
Button1 (default Button) with the following piece of code.

Dim session As New NotesSession

Call session.SetEnvironmentVar( "Section", "Button1" )
Call source.RefreshHideFormulas

Also ensure you have set the hide-when properties for both the sections.
@Environment("Section" )!="Button1" (Hide-when for Section1)
@Environment("Section" )!="Button2" (Hide-when for Section2)

Now try testing your form. You could see a TAB simulation in R4.x

This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.