[Q][morphic] TextMorph with raised border - no way

Andreas Raab Andreas.Raab at gmx.de
Thu Mar 28 21:46:47 UTC 2002


Martin,

All but simple borders derive their color from the morph they are owned
by. To provide a color that overrides the default from the morph you
have to provide a base color instead. E.g., something like

	borderStyle := RaisedBorder new.
	borderStyle width: 3.
	borderStyle baseColor: Color green.
	myMorph borderStyle: borderStyle.

will have the intended effect.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Martin Drautzburg
> Sent: Thursday, March 28, 2002 9:20 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: [Q][morphic] TextMorph with raised border - no way
> 
> 
> I cannot seem to figure out how to get a TextMorph with a raised
> border. 
> 
> If I just set the borderStyle to raised, then the colors are pulled
> >from the Morph's *text* color (black) and not from its background
> color. I can set the borderColor manually and it obeys, but the border
> is flat then.
> 
> I also tried
> 		 borderStyle: (RaisedBorder new color: Color white;
> 			 width: 3);
> but the border is still black.
> 
> If I manipulate the morph (aka "the murph") by its halo I cannot
> achieve much more.
> 
> 





More information about the Squeak-dev mailing list