[BUG] ScrollPanes, please help!!

Hernan Tylim htylim at yahoo.com.ar
Mon May 3 14:00:46 UTC 2004


Hi,
	Lately I am having a lot of trouble with PluggableTextMorphs and
PluggableListMorphs. What happens is that they seem not to layout themselves
properly. Note that this happens when they are put into the world. Later if
you call #extent: on them, or it's owner, the text, the list and the
scrollbars are put on the right place.

	Here are 2 snippets of code that you can use to reproduce the problem.
Please tell me if I am doing something wrong.

Example with a PluggableListMorph :

| m plm |
plm _ PluggableListMorph on: [(1 to: 20) collect: [:ea | ea asString]] list:
#value selected: nil changeSelected: nil.
plm
	color: Color blue muchLighter duller;
	hResizing: #spaceFill;
	vResizing: #spaceFill.
m _ BorderedMorph new
	extent: 100 at 200;
	color: Color white;
	layoutInset: 10;
	layoutPolicy: TableLayout new;
	addMorph: plm;
	yourself.
m openInHand.

Example with a PluggableTextMorph :

| m ptm |
ptm _ PluggableTextMorph on: ['this string
	has
	many
	Cr
	so
	the PluggableTextMorph
	will have
	to use
	scrollbars
	to show it']
	text: #value accept: nil.
ptm
	color: Color blue muchLighter duller;
	hResizing: #spaceFill;
	vResizing: #spaceFill.
m _ BorderedMorph new
	extent: 100 at 200;
	color: Color white;
	layoutInset: 10;
	layoutPolicy: TableLayout new;
	addMorph: ptm;
	yourself.
m openInHand.

Thanks

Regards,
Hernán




More information about the Squeak-dev mailing list