Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

CenterWindow in Window vert horiz (demension)

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.6  (30 votes)
  Discuss this Custom Function

Todd Dignan, Dignan Consulting Inc
http://www.dignanconsulting.com

Center Window in Window

Sample Input:
CenterWindow in Window vert horiz (vert) or CenterWindow in Window vert horiz (horiz)
Sample Output:
Center the window vertically basis on the info the custom function WindowInfo gathered. Also when the horiz pram is used the window widow will center horizontally.


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

This should be used with the "WindowInfo" custom function. (which gathers a windows, height, width, top and left px in global vars.) Call "WindowInfo" custom function first in a script before using this custom function. You will want to use "CenterWindow in Window vert horiz" custom function in a script step GTRR, Move/Resize Window or New Window. In these script steps you will want to place the custom function in the field "Distance from top" CenterWindow in Window vert horiz (vert) and the field "Distance from Left" CenterWindow in Window vert horiz (horiz). This will center the current window in the window info gathered by the custom function "WindowInfo". I hope this makes sense.


Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

I like it, but it doesn't work for me.

my script has:
SetVariable [ $windowInfo; Value:WindowInfo_CF]
NewWindow [Height: 450; Width:630; Top: CenterWindow_CF("vert"); Left: CenterWindow_CF("horiz"); Style: Dialog]

It appears that left and top are set to 0.

Andrew, Austin
October 24, 2012 2:45pm

Hi Andrew,

I think you posted this comment in the wrong custom function. Is custom function is call "CenterWindow in Window vert horiz" not CenterWindow_CF.

Stephen Dolenski do have a custom function name "cf_CenterWindowLeft" and cf_CenterWindowTop. Anyway, if you did want to use this CF you would need to use in conjunction with this CF the CF name "WindowInfo" found at http://www.briandunning.com/cf/1383.

I hop this helps.

Todd Dignan

Todd Dignan, Los Osos, CA
October 25, 2012 10:19am

I used this function after WindowInfo. (I can see the $$ variables). I used it in Window Resize but it doesn't 'move' the window to a centered location. Huh?

ron, idaho
October 29, 2012 10:45pm

Hi Ron,

It was designed to center a window within a window. The WindowInfo function get the info of the window you want to center the a new or existing window in. Can you send the script(s) that are calling the functions.

Todd Dignan, Los Osos, CA
October 29, 2012 11:49pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 1 + 3 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions