Layout vs. Frame: X position of objects
Layout vs. Frame: X position of objects
- Subject: Layout vs. Frame: X position of objects
- From: Todd Heberlein <email@hidden>
- Date: Wed, 27 Apr 2011 09:57:16 -0700
When using the "Size & Position" information for an object to position it in a view, what is the difference between the "Layout" and "Frame" values in the pop-up button? When should I use "Layout", and when should I use "Frame"?
When trying to layout objects, especially when trying to align them with the edge of a window, should I be using "Layout" when setting the X position and width?
Thanks,
Todd
--- Experiment ---
I took 5 objects in IB (3.2.6) and put them on a window, selected them all, and chose
Layout -> Alignment -> Align Left Edges
Visually they all looked aligned, but when I checked the X position of these objects under "Size & Position", I got a range of values for the "Frame" (see below) but a consistent value of 100 for "Layout".
100 NSScrollView (with NSTableView)
100 NSView (custom view)
97 NSBox
94 NSButton
93 NSTabView
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden