ResizeBox ET 1.0 by E. Jeremy Tira-Thompson 663 Mount Hope Rd South Fork, PA 15956 cft1@pop.pitt.edu http://www.pitt.edu/~cft1/Jeremy/Jeremy.html This is a NewtonScript proto that allows programmers an easy way to create views that can be intuitively resized by the user. I have included a sample package which uses several resize boxes in different ways. In this way, you can easily see how the protoResizeBox feels & reacts with different settings, and the different design issues to be considered. (clipping problems in particular - a good scrolling setup would usually be an ideal solution) The demo program is a simple little thing that allows you to add polygons to a main view & then move them around. The views include a protoResizeBox, and some have multiple protoResizeBoxes. This shows how the different justifications of the protoResizeBox change its behavior. The Integral Add is limited to the space within its parent view, which is simpler, but can be annoying. Notice that if the parent view is too small for Integral Add when it is opened, the view is clipped, and may not be usable. Code must be added to ensure that views are properly sized when opened. The Separate Add opens a new base view, which is slightly harder to code for properly, but allows much more freedom to the user. You may also notice that the Add dialogs have a different minimum size than the main view. protoResizeBox looks for a slot named minSize {width: x, height:y} in its parent view. If it is found, that data will be used to prevent the view from being scaled into nothingness. If it is not found (as in the main view) a 50x50 minimum size is assumed. protoResizeBox does not currently support views that have sibling alignments. I don't feel that floats or apps (the usual targets of protoResizeBox) are aligned off of siblings often enough to justify this time investment. However, the target view can be aligned any other way you want (Parent: Left, right, center, top, bottom, full, etc) and the values can be ratios (which can also cause some jumpiness since increments must be made by %) If you have any comments, please feel free to email me. If you do any work on this proto, send a copy to me! Requirements: Any 2.0 Newton system should be capable of running the demo package, and protoResizeBox may be capable of running on older systems with some modification. I want to move on to other projects. Disclaimer: It's not my fault if anything goes wrong! Tell me about it though, I will try to keep it from happening again. I hereby release this proto as freeware. As long as I get due credit for the proto, I will be happy. Please inform me of inclusion on any CDs or other distribution.