isFrontMostTabPanel ( _objectName )
Returns 1 if _objectName is or contains the frontmost tab panel, else 0
Average rating: 4.4 (33 votes) Log in to vote
Fabrice Nordmann - Show more from this author
1-more-thing https://www.1-more-thing.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Thanks to Agnès Barouh's CustomList, it is now possible to know if a tab is at frontmost without a recursive funciton.
The above code is long because it integrates CustomList in order to make this function available to FM Pro.
With Custom List installed as a custom function, this code would suffice :
----------------------
Let ([ $x = _objectName
// ENCLOSING OBJECTS
; $EON = $x & ¶ &
CustomList ( 1 ; ValueCount ( LayoutObjectNames ( Get ( FileName ) ; Get ( LayoutName ))) ; "case ( not isempty ( $x ) ; getlayoutobjectattribute ( $x ; \"enclosingobject\" ) & let([ $x = getlayoutobjectattribute ( $x ; \"enclosingobject\" )];\"\"))" )
//FRONT TAB PANELS
; $IFTP =
CustomList ( 1 ; ValueCount ( $EON ) ; "let([ $o = getvalue ( $EON ; [n] )]; getlayoutobjectattribute ( $o ; \"isFrontTabPanel\" ))")
];
PatternCount ( $IFTP ; 1 ) = ValueCount ( $IFTP )
)
---------------------
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.