Jump to content
Server Maintenance This Week. ×

Pop-Up where you want it!


This topic is 6463 days old. Please don't post here. Open a new topic instead.

Recommended Posts

With the new Filemaker 8.5 and the new ability to assign object names to any layout object, you can now have your pop-up windows show up where you want them. For example, let's say you have a script that runs a report. When you run this script, it displays a small pop-up window with "StartDate" and "EndDate" fields to allow users to select a date range for the report before it runs. You have a button on a layout that runs this script.

With Filemaker 8.5 you can have the pop-up window always show up on top of the button regardless of the location of the window at the time the button is clicked on.

Here is how to do i!

1. Assign a name to the button that runs the script. Let's assume you used "Report" as your object name.

2. Add these steps to the beginning of your script:

Set Variable [ $$Top; Value:GetLayoutObjectAttribute ("Report" ; "Top") ]

Set Variable [ $$Left; Value:GetLayoutObjectAttribute ("Report" ; "Left") ]

New Window [ Name: "Select Dates" ]

Go to Layout [ “Select Dates” (Inventory) ]

Show/Hide Status Area

[ Lock; Hide ]

Adjust Window

[ Resize to Fit ]

Move/Resize Window [ Current Window; Top: $$Top; Left: $$Left ]

Pause/Resume Script [ Indefinitely ]

The most important step here is that you are telling the script to move the window to the location of the button you just clicked on by using the values on the "$$Top" and "$$Left" variables which set themselves at the beginning of the script using the "GetLayoutObjectAttribute" function.

Good Luck to everyone from Coolboy!

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.