Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Pop-Up where you want it!


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

  • 2 months later...
  • 2 months later...

Thanks for the tip: I used it to create a pop-up window so when a user clicks on a field's label (a button), a pop-up appears with a definition for that label; it's much more legible than the eensy-weensy type in the Custom Dialog box!


I ran into a slight snag, though: when a user clicks on the label button the pop-up window appears on top of the "original" window, but the original window suddenly shifts to the left and is shrunken a little bit from its original maximized state.


As you can see in the script I tried freezing the window but to no avail.


Any suggestions?




Link to comment
Share on other sites

If you are using a maximized style interface, you may need to inser an additional step that will first resize the original window to a size a little wider and taller than the user's screen; this will make the window appear maximixed. I created a small sample file, with a 2 step script. Take a look!

Link to comment
Share on other sites

Thanks again! I'll have to revisit my coding: my pop-up doesn't appear over the button...I'll give it more thought tomorrow when I have both brain cells up and running after downing a quad-shot mocha.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Terms of Use