[Pharo-dev] DateModel label width

Sean P. DeNigris sean at clipperadams.com
Fri Jan 3 22:12:29 EST 2014


Benjamin Van Ryseghem-2 wrote
> I think we can do better :P (with still a workaround)

I was being a bit dramatic ;) I ended up with a slightly less depressing:
    open

	| windowModel labelMorphs |
	windowModel := self new openWithSpec.
	labelMorphs := windowModel window allMorphs select: [ :e | e isKindOf:
LabelMorph ].
	labelMorphs do: [ :e | self workAroundLabelAlignmentOf: e ].

    workAroundLabelAlignmentOf: aLabelMorph

	| isSpecLabel |
	isSpecLabel := aLabelMorph model isKindOf: LabelModel.
	isSpecLabel ifFalse: [ ^ self ].
	aLabelMorph owner
		hResizing: #spaceFill;
		changeTableLayout;
		listDirection: #rightToLeft.
	aLabelMorph 
		hResizing: #shrinkWrap;
		width: 155.

No rush on this. I'm good for now.



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/DateModel-label-width-tp4733674p4734026.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




More information about the Pharo-dev mailing list