aalrr1 Posted June 16, 2008 Posted June 16, 2008 I have set up Tabs named by Position, i.e. Attorneys, Managers. The named tabs are part of the Header; the Body includes the lower part of the tab control. Each tab (built like a List) includes pertinent fields based on positon. The FoundSet is different for each tab. When the Attorneys tab is selected, I want only attorneys to display. I put a transparent button on the tab to run a script for each tab. However, the user has to press the Tab twice before the script runs. Is there a better way? Thank you.
mr_vodka Posted June 16, 2008 Posted June 16, 2008 There are a few different ways to achieve this. The first way is to create fake tabs and attach scripts to them. Make the original tab control tabs hidden by using a fixed width of 0 pixels (there are posts on here about how to achieve this in further detail). Make sure you name each tab panel with an object name prior to hiding them so that you can reference them in your scripts using Go to Object. Another method would be to use filtered portals for each of your different tab panel tabs.
aalrr1 Posted June 18, 2008 Author Posted June 18, 2008 I would prefer using the filtered portals. However, am having problems. On a Form, I have 5 Tabs, 4 -- one each for a different group of people by Position from the same Employees table, and the 5th one for ALL employees. I have created 5 global fields (in the Employees table), one for each Position and the ALL category. I have related the global field to the Positions field (also in the Employees table) with a self join (duplicate) table. All records are displaying on every tab. I'm new at this and pretty confused by this time. Any help would be appreciated.
mr_vodka Posted June 18, 2008 Posted June 18, 2008 With this you will need 5 relationships. One for each of the global fields to the Positions field. Are you referencing the related self join for you portals?
aalrr1 Posted June 27, 2008 Author Posted June 27, 2008 I did get this working with 5 globals. Thank you for the help.
Answers Posted July 7, 2008 Posted July 7, 2008 I also want to link script to a tab. I have a tab to view invoices and then one tab that I want to create a new invoice, one to view a certain type of invoice. I guess I'm having trouble deciding to make a fake tab. Or creating a filtered portal as mentioned here. The one tab panel I want to click and the same screen as the invoice screen comes up but a blank record. My customer likes the whole tab control thing. Any help would be appreciated. I so wish I could attach a script to a tab panel.
fabriceN Posted July 7, 2008 Posted July 7, 2008 (edited) This example of onEvent programming requires myFMbutler DoScript (you can replace it with zippscript if you wish). HTH onTabFocus.fp7.zip Edited July 7, 2008 by Guest
R2D2 Posted March 12, 2009 Posted March 12, 2009 I'm returning to this old topic. I also wanted to associate a script start (GoTo Layout nn) to one of the Tab Panel choices. It can possibly be done via script triggering in FM 10, but does it work in IWP ? If not, how can this be done ?
R2D2 Posted March 14, 2009 Posted March 14, 2009 So, I assume, it is not possible to link a tab control to a script. Or was this too stupid question to be answered ? :
bcooney Posted March 14, 2009 Posted March 14, 2009 (edited) I think in this post, an actual tab panel is being confused with a design that mimics a tab panel. In a real tab panel, the portal displayed in the panel must be a related child table. It could be a cartesian relationship. However, you cannot go to a different parent layout by clicking a tab panel tabs, without leaving the current parent layout. A pseudo-tab panel is exactly that. Graphics added to a layout that looks like a tab panel. Another layout has these graphics in the exact same location, so that to a user it appears that they are on the same parent layout when they click between tab panels. This was actually how we all did tab panel interfaces before the "real" tab panel object was introduced in FM. Here is a link to Geoff Coffey's technique for using Script Triggers with tab panels. Link ..and attached is an FM10 only demo file that uses Geoff's technique, modified from Fabrice's original. onTabFocusScriptTrigger.fp7.zip Edited March 14, 2009 by Guest Added demo file
R2D2 Posted March 15, 2009 Posted March 15, 2009 Yes, that demo seems to be working the way I wanted, but it uses script triggers and I believe they don't work in IWP environment.
Recommended Posts
This topic is 5743 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