Martins Posted October 28, 2007 Posted October 28, 2007 I am using tab control in one of the layouts but when I switch to another layout and back again, the visible tab has changed from the one I had open. Why is this happening? Further to this, is there any way of controlling which tab view shows when using a script? For instance, when running an error-checking script, can it direct the user to a specific tab view in a layout or does it just go the layout and the user has to figure which tab window is to be corrected? I can’t see any options/preferences in the software. Martins
bcooney Posted October 28, 2007 Posted October 28, 2007 In FM8.5, the tab that will show is the tab that was last selected in layout mode. In FM9, there is a new setting for tab panels "default front tab." You can name your tabs using the object info palette, then use Go To Object script step.
Martins Posted October 28, 2007 Author Posted October 28, 2007 Thanks for that. However, I am finding that it does not return to the last open Tab, but only the front tab (which is rather annoying!). I seem to recall some script steps similar to the one you describe as being in FM9 in my current version. Should I explore that option? Martins
Vaughan Posted October 29, 2007 Posted October 29, 2007 "However, I am finding that it does not return to the last open Tab, but only the front tab (which is rather annoying!)." This is how tab controls work: they always return to the default tab, not the tab that was last displayed. Scripting is required to force a return to the last tab displayed; or ditch the tab controls and go back to separate layouts and scripting.
Martins Posted October 29, 2007 Author Posted October 29, 2007 Thanks for your help Vaughan, I’ll look into the Object/Scripting solution. Martins
bcooney Posted October 29, 2007 Posted October 29, 2007 (edited) Thanks for that. However, I am finding that it does not return to the last open Tab Not the last open tab, the last selected tab in layout mode. Another method, used prior to objects, was to define a field with repetitions in your parent table. This field remains empty. In fact, it can be a global. Then, put the field on each of the tab panels, with the rep showing that is respective to the tab panel. That is, on tab panel 1, field tabnav[1], tab 2, tabnav[2]. Then, in the script that returns to the layout, you can "select" the tab you want by using Go To Field::tabnav[#] followed with a Commit Records. Edited October 29, 2007 by Guest
Recommended Posts
This topic is 6304 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now