How to set up one set of navigation icons on multiple forms?

The app consists of 30-40 forms… all the forms have the same set of 5 navigation icons (such as Return, Back, Forward, etc.) which enable the user to navigate the app. Each icon is on a label and a click on the label takes user to a function… for example, Back icon takes you to the previous form.

I’ll have to name the icons with a different name on each form. That means there will be 5 onclick functions for each form… let’s say 200 (5 times 40) onclick functions… Each onclick function can point to one of 5 functions (in Global Code) that execute the desired ‘navigation’. So, 205 functions for navigation.

Is there an easier way to do this?

Tom

Yes. Here are a couple of ways:

  1. Show two forms at the same time. One with your buttons, the other with the active form information. If you set the form’s screenMode property to ‘Actual Size’ you can then define the position each form should display in.

  2. Put the buttons into a Container. Use Form2.appendChild(conButtons) to add the Container to whatever form is showing.

Hi Tom
There is another way. Create a form that only contains objects that you use on all other forms such as your navigation buttons. You will never show this form. In your Sub Main add each of the objects with the line ‘NSBPage.appendChild(YourObject)’. This will add the object to every form. In the on-click event function you have to determine which form is open and then respond appropriately. This method allows you to have one object shared by all forms and one on-click function. If you have a form that does not use the shared object, hide them on the on-show function and show them again when the form closes.
Helen

Thank both for you replies…