January 7, 200818 yr I am trying to customize a script to perform differently based on which tab control on the layout is currently active. Any ideas?
January 7, 200817 yr Well, you could hard code a test against each tab panel in your control: GetLayoutObjectAttribute("YourTabObjectNameHere";"isFrontTabPanel") The quotes are required. Edited January 7, 200817 yr by Guest
January 8, 200817 yr Author Perfect. Thanks! Didn't even think to assign object names to the tabs themselves. Good tip!
January 8, 200817 yr Object naming'll come in handy when you need to navigate to specific tab panels as well, using Go To Object[] :)
February 11, 200817 yr I've just started working with Tab Control and found this thread, so I will add my question to it because it's similar to my issue. I created an unstored calc called cActiveTab: If ( GetLayoutObjectAttribute ( "TabOne" ; "isFrontTabPanel" ) ; "TabOneActive" ; "TabOneNotActive" ) It doesn't get any simpler than that. However, when I click on the tabs in my layout, the result of the calc does not change. The tab layout object is definitely named correctly. What am I doing wrong? Many thanks for your suggestions--
February 11, 200817 yr Make sure you actually check "Do Not Store..." in Storage Options. For whatever reason, "none" is not enough. Also make sure you have "Do not evaluate if all referenced fields are empty" UNchecked.
February 11, 200817 yr Thanks for your reply, Colin. Those boxes are already checked. FWIW, if I click into the calc field on the layout, it instantly updates and shows the correct active tab. But only if I click into it. :)
February 11, 200817 yr FileMaker's app window doesn't refresh as a result of selecting a tab panel. Play with the Records...Refresh Window menu item and you'll see what I mean. Are you using this as some kind of presentation layer interface element?
February 11, 200817 yr This calc field will not be used in the presentation layer, I'm using it for development purposes only. I suppose I could just use the Data Viewer instead, but sometimes I like to place certain 'helper fields' right there on the layout as I program so I can easily monitor the status of certain operations. Not a big deal, I can certainly work around it. Thanks for your replies, Colin.
Create an account or sign in to comment