[Q] [Morphic] SystemWindow

Chris Burkert christian.burkert at s2000.tu-chemnitz.de
Sat Mar 8 14:03:39 UTC 2003


Hello Squeakers

I want to build a nice SystemWindow for my application. The problem is 
resizing. For example take a Package Browser and resize it as small as 
possible. There will be Morphs displayed outside the SystemWindow.




My code with the same problem would look like this (a DoIt should work):

| window playfield bar |
bar _ (RectangleMorph new) width: 500.
window _ (SystemWindow labelled: 'my App').
playfield _ (RectangleMorph new)
	layoutPolicy:		TableLayout new;
	hResizing:		#spaceFill;
	vResizing:		#spaceFill.
playfield addMorph: bar.
window
	addMorph: playfield fullFrame: (LayoutFrame fractions: (0 at 0 corner: 
1 at 1) offsets: (0 at 0 corner: 0 at 0));
	openInWorld.




So I tried the following:

| window playfield bar |
bar _ (RectangleMorph new) width: 500.
window _ (SystemWindow labelled: 'my App')
	layoutPolicy:		TableLayout new;
	hResizing:		#shrinkWrap;
	vResizing:		#shrinkWrap.
playfield _ (RectangleMorph new)
	layoutPolicy:		TableLayout new;
	hResizing:		#spaceFill;
	vResizing:		#spaceFill.
playfield addMorph: bar.
window
	addMorphBack: playfield;
	openInWorld.




Now the Titelbar and some colors are displayed completely wrong _but_ it 
resizes correct. I believe this is a problem with Alignment. Is there a 
way around so that the window displays itself correct _and_ it resizes 
to #shrinkWrap?

Should SystemWindow be refactored so that it supports the newer layout 
Policies?

thanks
            Chris Burkert
-- 
------------------------------------------------------------------------
Student of applied Computer Science at Chemnitz University of Technology
      http://www.chrisburkert.de/            chris at chrisburkert.de
------------------------------------------------------------------------
"I invented the term Object-Oriented, and I can tell you I did not have
  C++ in mind." - Alan Kay --> http://www.whysmalltalk.com/



More information about the Squeak-dev mailing list