Dr. Evil Posted July 26, 2006 Posted July 26, 2006 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!
Dr. Evil Posted July 26, 2006 Author Posted July 26, 2006 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.
Dr. Evil Posted July 27, 2006 Author Posted July 27, 2006 :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
Dr. Evil Posted July 27, 2006 Author Posted July 27, 2006 (edited) The attached file is "kinda" working, but has some problems with window sizing. There are additional notes in the file. Thanks! Edited July 28, 2006 by Guest Removed outdated file
Fitch Posted July 27, 2006 Posted July 27, 2006 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
Dr. Evil Posted July 28, 2006 Author Posted July 28, 2006 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
Fitch Posted August 1, 2006 Posted August 1, 2006 Your calc <> my calc. Mine: leftA + (widthA - widthB)/2 Yours: leftA + widthA - widthB/2
Dr. Evil Posted August 1, 2006 Author Posted August 1, 2006 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?
Fitch Posted August 2, 2006 Posted August 2, 2006 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.
Dr. Evil Posted August 2, 2006 Author Posted August 2, 2006 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!
Recommended Posts
This topic is 6690 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now