July 26, 200619 yr I'm interested in the "genie" effect. Making new windows fold out when opening and collapse into themselves when closing. My navigation scripts are getting more and more involved so as the nature of database building. So I am looking for the cleanest, simplest way of achieving this effect. Thank you all!
July 26, 200619 yr Author Hello, I have created a new model file and updated the post at: http://www.fmforums.com/forum/showtopic.php?tid/178990/ Thank you all for all your help and hope all is well with you all.
July 27, 200619 yr Author :oops: above link is bad. I'm at home now, and do not have the file on me that was attached. I will attach the file I mentioned to this thread tomorrow. rock on
July 27, 200619 yr Author The attached file is "kinda" working, but has some problems with window sizing. There are additional notes in the file. Thanks! Edited July 28, 200619 yr by Guest Removed outdated file
July 27, 200619 yr Regarding the notes in your file, you can set a variable at the top of the script to, for example: Get ( WindowHeight ) - 50 And then exit the loop when the height is greater than the variable. Regarding centering the window horizontally relative to another window, you can get the left position and width of the windows... the center point is half the width... a little mathematical ponder... the left of new window would be the the left of the old, plus the difference of the two widths divided by 2: leftA + (widthA - widthB)/2
July 28, 200619 yr Author Hello, I have attempted to work in the new clc's and I'm having problems Getting parameters for the NEW window. My clc's keep using Getting from Parent window and I do not know how to Get for NEW window. I have attached updated FM file and screen shots of the two major scripts for reference. Problems are also noted within file scripts and fields. PROBLEMS WITH WindowShade SCRIPT: - New window is resized correctly. Resizing to parent window instead of âresizing to fitâ its own. - New window is NOT positioned center relative to parent window. The Get functions are getting parent coordinates and not the new window coordinates. - Loop ends once OLD window size is met, not NEW window size Any Suggestions? THANKS A HEAP! :bang: WindowGenie.fp7.zip
August 1, 200619 yr Your calc <> my calc. Mine: leftA + (widthA - widthB)/2 Yours: leftA + widthA - widthB/2
August 1, 200619 yr Author Opps, the centering from left to right in relation to parent works now that the () have been added. I still have the problem of resizing new window to fit it's own. Currently new window is opening the same size as the parent, the new window is smaller. Any ideas?
August 2, 200619 yr I don't quite follow your grammar, but it looks like you're exiting the resize loop when the window reaches the parent window's height. I don't think you'll be able to zoom the new window and get its height without a screen flash -- try it -- so you'll need to get the desired height in advance and hard-code it into the script.
August 2, 200619 yr Author sorry if I am confusing. I knew I could hard code it in, but was trying to avoid it so I could make a more generic window genie script for all new sub windows throughout solution. If I hard code it in, I will have a grip of coordinates to enter. I will look into my script again with fresh eyes and see what I can work up. Thank you for your time!
Create an account or sign in to comment