3 Replies Latest reply on Aug 19, 2013 10:00 AM by user22497

    Modifying Tab Control in runtime

    user22497

      Title

      Modifying Tab Control in runtime

      Post

           Hi,

           I need a Tab Control to be modified depending on the type of contact entered. I have many types of contacts, but will use only two as examples: doctors and lawyers.

           The intention is that when the contact is a lawyer its particular tabs appear and those related to doctors, disappear. The same should happe when a doctor is selected: its tabs should appear and those of the lawyers, disappear.

           Is there a way to modify a Tab Control during runtime to achieve this?

           Thanks in advance!

        • 1. Re: Modifying Tab Control in runtime
          philmodjunk

               You cannot change the properties of any layout object while in browse mode, manually or via script.

               But you can use three tab controls for what you describe in your example.

               Create a tab control for Doctors. Create a Tab Control for Lawyers. Create a third tab control with two panels. Put the tab control for doctors inside one of those panels and the tab control for doctors inside the other.

               You can then give each of the two tab panels object names using the Name box inside the Inspector's Position tab.

               IF you make the enclosing tab control invisible by selecting the appropriate fill and border properties, you can use a script with go to object to make either the tab control for doctors or the tab control for lawyers visible and the other one invisible.

               And a completely different approach is to create two layouts, one for lawyers and one for doctors. Your scripts can then control which layout is selected. If the two layouts are identical except for the tab control this can also create the illusion that you have one layout that customizes itself for either lawyers or doctors.

          • 2. Re: Modifying Tab Control in runtime
            SteveMartino

                 Here's a thread to a similiar question where DaSaint and S Chamblee came up with a solution for me (with file)

            Tab Panels--selecting via script.  After I got it to work, I hid the tab labels as Phil described above.

                  

            • 3. Re: Modifying Tab Control in runtime
              user22497

                   Thanks a lot for the quick and helpful responses!