Function overview
Prototype
WhereAreObjects (
Layout )
Parameters
Layout Get ( LayoutName ) or Name of Layout
Description
Tags:
Objects Layout Objects Layout Custom List
Returns the list of layout objects.
Returned elements by object are: name, type, source and position ( left and top )
A convenient function to locate objects on a Layout .
Examples
Sample input
WhereAreObjects ( Get ( LayoutName ) )
Sample output
1. Hello - rectangle | L : 393 | T : 274
2. a - tab panel | L : 424 | T : 291
3. a_1 - tab panel | L : 436 | T : 339
4. a_2 - tab panel | L : 436 | T : 339
5. a_3 - tab panel | L : 436 | T : 339
6. b - tab panel | L : 424 | T : 291
7. ct_Name - field TableC::Name | L : 460 | T : 357
8. c - tab panel | L : 424 | T : 291
9. c_1 - tab panel | L : 447 | T : 349
10. c_2 - tab panel | L : 447 | T : 349
Function code
/* WhereAreObjects ( Layout ) v2.1
WhereAreObjects () requires CustomList ( Start; End; Function )
//-------------------------------------------------------------------*/
// Agnès Barouh - Aout 2007 - Bugs / Corrections Report : barouh.agnes@wanadoo.fr
//-------------------------------------------------------------------*/
Let ([
$ObjList = LayoutObjectNames ( Get ( FileName ); Layout ) ;
$ObjTarget = CustomList ( 1; ValueCount ( $ObjList );
"Let ([ Value = GetValue ( $ObjList ; [n] ) ];
case ( Not IsEmpty ( GetLayoutObjectAttribute ( Value ; \"ObjectType\" )) ; Value ))")
];
CustomList ( 1; ValueCount ( $ObjTarget );
"Let ([ Value = GetValue ( $ObjTarget ; [n] ) ];
[n] & \". \" & Value & \" - \" & GetLayoutObjectAttribute ( Value ; \"ObjectType\" ) &
\" \" & GetLayoutObjectAttribute ( Value ; \"Source\" ) &
\" | L : \" & GetLayoutObjectAttribute ( Value ; \"Left\" ) &
\" | T : \" & GetLayoutObjectAttribute ( Value ; \"Top\" ))"
)
)
// ===================================
/*
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/216
Prototype: WhereAreObjects( Layout )
Function Author: Agnès (http://www.fmfunctions.com/mid/46)
Last updated: 20 April 2009
Version: 1.8
*/
// ===================================
/* WhereAreObjects ( Layout ) v2.1__LITBR__ WhereAreObjects () requires CustomList ( Start; End; Function )__LITBR____LITBR__ //-------------------------------------------------------------------*/__LITBR__ // Agnès Barouh - Aout 2007 - Bugs / Corrections Report : barouh.agnes@wanadoo.fr__LITBR__ //-------------------------------------------------------------------*/__LITBR____LITBR__Let ([__LITBR____LITBR__$ObjList = LayoutObjectNames ( Get ( FileName ); Layout ) ;__LITBR__$ObjTarget = CustomList ( 1; ValueCount ( $ObjList );__LITBR__ "Let ([ Value = GetValue ( $ObjList ; [n] ) ];__LITBR__ case ( Not IsEmpty ( GetLayoutObjectAttribute ( Value ; \"ObjectType\" )) ; Value ))")__LITBR__];__LITBR__ CustomList ( 1; ValueCount ( $ObjTarget );__LITBR__ "Let ([ Value = GetValue ( $ObjTarget ; [n] ) ];__LITBR__ [n] & \". \" & Value & \" - \" & GetLayoutObjectAttribute ( Value ; \"ObjectType\" ) &__LITBR__ \" \" & GetLayoutObjectAttribute ( Value ; \"Source\" ) &__LITBR__ \" | L : \" & GetLayoutObjectAttribute ( Value ; \"Left\" ) &__LITBR__ \" | T : \" & GetLayoutObjectAttribute ( Value ; \"Top\" ))"__LITBR__ )__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/216__LITBR____LITBR__ Prototype: WhereAreObjects( Layout )__LITBR__ Function Author: Agnès (http://www.fmfunctions.com/mid/46)__LITBR__ Last updated: 20 April 2009__LITBR__ Version: 1.8__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.