[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

window-size-parts question

When creating a new window, it appears that window-size-parts gets called
_before_ any subviews are added to it.  Is this intentional?  It seems like
a mistake to me.  If you want to have a window's subviews adjust
dynamically to the size of the window, you most certainly would want to
have them also adjust to whatever :view-size initarg is supplied when that
window is initially created.

Here's a simple test case:

(defclass test-dialog (dialog) ())

(defmethod window-size-parts ((d test-dialog))
   (format t "Subviews of ~S are ~S~%" d (subviews d)))

(make-instance 'test-dialog 
  :view-size #@(200 200)
  :view-subviews (list (make-instance 'static-text-dialog-item)))

Right now I have to call window-size-parts "manually" after all the
subviews have been added, but before I show the window.

Any ideas?


Kemi Jona           jona@ils.nwu.edu             
Institute for the Learning Sciences, Northwestern University             
1890 Maple Ave., Rm.354, Evanston, IL 60201                  
(708) 467-1969 or 491-3500     FAX: (708) 491-5258