Calendar

Scott Wallace Scott.Wallace at disney.com
Mon May 15 10:14:47 UTC 2000


Very cute, and immediately useful, Torsten!  Thank you!

Actually, you don't need to modify SimpleButtonMorph.initialize in 
order to avoid the rounded corners.  Just send the message 
#useSquareCorners to your simpleButtonMorphs and simpleSwitchMorphs. 
Doing this in two methods, namely WeekMorph.tile and 
MonthMorph.initializeHeader, will get the result you want without 
changing the default properties of SimpleButtonMorph.

For example, make WeekMorph.tile become:

tile
	| onColor offColor |
	offColor _ Color r: 0.4 g: 0.8 b: 0.6.
	onColor _ offColor mixed: 1/2 with: Color white.
	^ SimpleSwitchMorph new
		offColor: offColor;
		onColor: onColor;
		borderWidth: 1;
		useSquareCorners;        "<------------------"
		extent: 23 @ 19

... and make the corresponding change in MonthMorph.initializeHeader.

   -- Scott

At 10:45 AM +0200 5/15/00, wrote:
>I've found a MonthMorph in my private Squeak archive.
>It will look much better if you dont initialize SimpleButtonMorphs
>with roundedCorners:
>
>SimpleButtonMorph>>initialize
>
>	super initialize.
>	self borderWidth: 1.
>	"self cornerStyle: #rounded."			"commented out to
>have a better look for MonthMorph"
>	self color: (Color r: 0.4 g: 0.8 b: 0.6).
>	self borderColor: self color darker.
>	target _ nil.
>	actionSelector _ #flash.
>	arguments _ EmptyArray.
>	actWhen _ #buttonUp.
>	self setDefaultLabel
>
>Bye
>Torsten
>
>
>
>-----Original Message-----
>From: Stewart MacLean [mailto:stingray at paradise.net.nz]
>Sent: Montag, 15. Mai 2000 03:43
>To: 'squeak at cs.uiuc.edu'
>Subject: Calendar
>
>
>Hi all,
>
>I needed to look at a calendar and wondered if there was a Calendar Morph or
>such like? (seems topical, as we now have a clock :))
>
>I have dug out an old method from V286 (half a meg image in its raw form!)
>and fixed it to work in Squeak (alignment is a bit funny due to fonts).
>
>I would publish it here but not sure about copyright issues?
>
>Cheers,
>
>Stewart
>
>Content-Type: application/octet-stream;
>	name="Calendar.28Jul225am.cs"
>Content-Disposition: attachment;
>	filename="Calendar.28Jul225am.cs"
>
>Attachment converted: Mfalme:Calendar.28Jul225am.cs 1 (????/----) (0003F47A)





More information about the Squeak-dev mailing list