Help with TwoWayScrollPane

Bob Arning arning at charm.net
Wed Jan 30 02:21:07 UTC 2002


On Tue, 29 Jan 2002 19:58:39 -0600 Daniel Joyce <daniel.a.joyce at worldnet.att.net> wrote:
>	How can I use the scrollpane morph?
>
>	Demo code would be nice, or pointer to example.

Hmm... 
- browse the class TwoWayScrollPane
- find class references
- the first one is Morph>>inATwoWayScrollPane
- the simpler sender of that is SyntaxMorph>>openInWindow which, if you trace back a few more steps, is used when selecting 'tile scriptor' from the shifted menu on a browser's message list.

There is a little glitch if you actually try to use the item mentioned. Fix included below.

Cheers,
Bob

'From Squeak3.2gamma of 17 January 2002 [latest update: #4653] on 29 January 2002 at 9:12:07 pm'!
"Change Set:		nilOwnerFix
Date:			29 January 2002
Author:			Bob Arning

#colorForInsets seems to be called earlier these days. deal with it."!


!TwoWayScrollPane methodsFor: 'access' stamp: 'RAA 1/29/2002 21:10'!
colorForInsets
	"My submorphs use the surrounding color"
	| aColor |

	owner ifNil: [^ Color white].
	(aColor _ owner color) ifKindOf: Color thenDo: [:c | ^ aColor].
	"This workaround relates to cases where the scrollPane's color is not a true color but rather an InfiniteForm, which is not happy to be returned here"
	^ Color white! !



More information about the Squeak-dev mailing list