[Pharo-dev] Proportional Layout does not work for me

kmo voxkmp at gmail.com
Sat Apr 9 13:44:59 EDT 2016


I was just experimenting with creating a user interface in Pharo using
Morphic. I wanted to create a sub-morph that fills its parent with a 50
pixel gap at the top and a 50 pixel gap at the bottom (leaving space for a
toolbar at the top and a status bar at the bottom).

This code works in pharo 3 but does not work in pharo 4 or 5:

Morph>>>initialize
|frame sub|
	super initialize.
	self layoutPolicy: ProportionalLayout new.
	frame := LayoutFrame fractions: (0.0 @ 0.0 corner: 1.0@ 1.0) offsets: (0 at 50
corner: 0 at 50 negated).
	sub := BorderedMorph new.
	sub color: Color red.
	self addMorph: sub fullFrame: frame.
	self extent:600 at 600. 

Am I doing something wrong or is proportional layout broken?



--
View this message in context: http://forum.world.st/Proportional-Layout-does-not-work-for-me-tp4889237.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



More information about the Pharo-dev mailing list