Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
LayoutFrame
Last updated at 11:24 pm UTC on 9 April 2018
A LayoutFrame is specific to a ProportionalLayout of which it is the essential component. A Morph acquires a proportional layout from the message #addMorph:fullFrame: . A layout frame is defined by decimal coordinates in a 1 X 1 rectangle
From the class comment:
I define a frame for positioning some morph in a proportional layout.

Instance variables:
    leftFraction 
    topFraction 
    rightFraction 
    bottomFraction 	(Float)	The fractional distance (between 0 and 1) to place the morph in its owner's bounds

    leftOffset 
    topOffset 
    rightOffset 
    bottomOffset 	(Integer)	Fixed pixel offset to apply after fractional positioning (e.g., "10 pixel right of the center of the owner")


A LayoutFrame is used with
aMorph addMorph: otherMorph fullFrame: aLayoutFrame
and
aMorph addMorph: otherMorph frame: aRectangle
(which simply builds a LayoutFrame from aRectangle and delegates to addMorph:fullFrame:)
See also TableLayout for a more table-like way of laying out Morphs.



LayoutFrame example