madman411 Posted August 20, 2015 Posted August 20, 2015 This is my first time really working with tab controls. A certain script I'm developing needs to know what tab the user is viewing in order to continue. In addition, there are some buttons (outside of the tab layout object) on the layout I wish to hide when tab x is being viewed. Is there a way to make FileMaker "intelligently know" what tab is being viewed by the user?
OlgerDiekstra Posted August 20, 2015 Posted August 20, 2015 It's a bit convoluted, but you can use GetLayoutObjectAttribute in a custom function to determine this Something like: Case ( GetObjectLayoutAttributes("Tab1"; "isFrontTabPanel"); "Tab1"; GetObjectLayoutAttributes("Tab2"; "isFrontTabPanel"); "Tab2"; GetObjectLayoutAttributes("Tab3"; "isFrontTabPanel"); "Tab3"; ) If you create this as a function it will return the name of the tab. Tab1, Tab2, Tab3 need to be the object names of the tabs. http://help.filemaker.com/app/answers/detail/a_id/6146/~/using-the-getlayoutobjectattribute-function 1
madman411 Posted August 21, 2015 Author Posted August 21, 2015 It's a bit convoluted, but you can use GetLayoutObjectAttribute in a custom function to determine this Something like: Case ( GetObjectLayoutAttributes("Tab1"; "isFrontTabPanel"); "Tab1"; GetObjectLayoutAttributes("Tab2"; "isFrontTabPanel"); "Tab2"; GetObjectLayoutAttributes("Tab3"; "isFrontTabPanel"); "Tab3"; ) If you create this as a function it will return the name of the tab. Tab1, Tab2, Tab3 need to be the object names of the tabs. http://help.filemaker.com/app/answers/detail/a_id/6146/~/using-the-getlayoutobjectattribute-function Cheers!
David Jondreau Posted August 21, 2015 Posted August 21, 2015 Do you have more than one tab control on the layout? There can be many "frontmost" tabs. FileMaker can't know which tab a user is actually looking at! A custom function like this is probably a better choice: https://www.briandunning.com/cf/694
Recommended Posts
This topic is 3715 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