Steelers1 Posted January 7, 2008 Posted January 7, 2008 I am trying to customize a script to perform differently based on which tab control on the layout is currently active. Any ideas?
Colin Keefe Posted January 7, 2008 Posted January 7, 2008 (edited) Well, you could hard code a test against each tab panel in your control: GetLayoutObjectAttribute("YourTabObjectNameHere";"isFrontTabPanel") The quotes are required. Edited January 7, 2008 by Guest
Steelers1 Posted January 8, 2008 Author Posted January 8, 2008 Perfect. Thanks! Didn't even think to assign object names to the tabs themselves. Good tip!
Colin Keefe Posted January 8, 2008 Posted January 8, 2008 Object naming'll come in handy when you need to navigate to specific tab panels as well, using Go To Object[] :)
Saubs Posted February 11, 2008 Posted February 11, 2008 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--
Colin Keefe Posted February 11, 2008 Posted February 11, 2008 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.
Saubs Posted February 11, 2008 Posted February 11, 2008 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. :)
Colin Keefe Posted February 11, 2008 Posted February 11, 2008 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?
Saubs Posted February 11, 2008 Posted February 11, 2008 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.
Recommended Posts
This topic is 6141 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