2 Replies Latest reply on Jun 19, 2017 12:58 PM by user21385

    Specifying card window position relative to layout object

    hschlossberg

      FM16; Windows 7

       

      I'm not sure if this is a feature request or a bug...but it is definitely a "product issue". ;-)

       

      In a script, I want to open a new card window so that the top-right of the new window is aligned with the bottom-right of the button that calls the script.  This works great if I hard-code the desired position into the script after checking the bottom-right button position in layout mode.

       

      I was, however, trying to be more dynamic with the script; in case the button gets moved, I still want the script to know where to open the new window.  I started with trying to determine it based on getlayoutobjectattributes("myButton"; "bounds"), but that only provides the button's position relative to the SCREEN, while the top/left positions for the card window position it relative to the left edge of the parent WINDOW and the top edge of the parent LAYOUT.

      I can calculate the left position for my new card window by figuring get(windowLeft) into my calculation.  But I don't think there's any way to know where the top of the layout happens to be (i.e. how big is the status area if it is open and how tall is the menu bar and top window frame and format bar (if open)).

       

      Howard

        • 1. Re: Specifying card window position relative to layout object
          TSGal

          hschlossberg:

           

          Thank you for your post.

           

          At this time, there is no function that captures an active Formatting Bar.  Otherwise, if you don't allow the Formatting Bar, then you could adjust the placement with Get (StatusAreaState) and Get (MenuBarState) within the window, and adjust further with Get (WindowTop) and Get (WindowLeft).

           

          I recommend posting a request for a Get (FormattingBarState) to the Product Ideas board at:    Product Ideas

           

          The Product Ideas board is monitored by Product Management and Development.  All entries are reviewed, discussed and considered for possible implementation in a future release.

           

          TSGal

          FileMaker, Inc.

          1 of 1 people found this helpful
          • 2. Re: Specifying card window position relative to layout object
            user21385

            Hi Howard,

            Not sure if you solved your issue but this seems to work:

            New Window [ Style: Card ; ...

            Top: GetLayoutObjectAttribute ( "YourButtonName" ; "top" ) - Get ( WindowTop ) - ( Get ( WindowHeight ) - Get ( WindowContentHeight ) )

            Left: GetLayoutObjectAttribute ( "YourButtonName" ; "left" ) - Get ( WindowLeft )

            I haven't tested on Windows yet but thought it might help.

            Ian.

            1 of 1 people found this helpful