GetObjectWidth ( )

Function stats

Average user rating
489
377
9999
Support
FileMaker 10.0 +
Date posted
12 February 2015
Last updated
12 February 2015
Version
Recursive function
No

Author Info
 wwdto

2 functions

Average Rating None

author_avatar



 

Function overview

Prototype

GetObjectWidth  ( ObjectName )


Parameters

ObjectName  


Description

Tags:  Layout Objects   Layout Calculation  

Uses the GetLayoutObjectAttribute function:

GetLayoutObjectAttribute ("WebViewer.Maps"; "bounds") Returned values are 1:left 2:top 3:right 4:bottom 5:?

Corresponds with the CF "GetObjectHeight"

Examples

Sample input

GetObjectWidth ( "WebViewer.Maps")


Sample output

790 - when GetLayoutObjectAttribute ("WebViewer.Maps"; "bounds") returns: 5 345 795 770 0

 

Function code

Let ( [ObjectBounds = GetLayoutObjectAttribute (ObjectName; "bounds")
        ; RightPosition = MiddleWords ( ObjectBounds ; 3 ; 1 )
        ; LeftPosition = MiddleWords ( ObjectBounds ; 1; 1 )]
    ; RightPosition - LeftPosition
)

/*
2015, Wolfgang Wunderlich
DeskTop Organisaton GmbH
GetLayoutObjectAttribute ("MyButton"; "bounds") returns: 138 24 391 38 0
Returned values: 1-left 2-top 3-right 4-bottom 5:?
*/

// ===================================
/*

    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/377

    Prototype: GetObjectWidth( ObjectName )
    Function Author: wwdto (http://www.fmfunctions.com/mid/489)
    Last updated: 12 February 2015
    Version: 1.2

*/
// ===================================

 

Comments

Fabrice
04 May 2016



Why not simply use GetLayoutObjectAttribute ( objectName ; "width" ) ?
  General comment
wwdto
05 May 2016



I just did not find it - and were lucky having a solution for a certain problem ;-)
That's all. Thanks.
  General comment

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (31)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (7)