Problem: 1347449

Title: (Windows) Dynamically Resizing (on, off)

Received: May 6 1996 9:44AM


Here is something I would like to see put into MacApp. It is a small change, should hurt no one, and help some ( like myself ). The problem is when trying to dynamically change whether or not a window is resizable, the window's growRgn isn't easy to change without doing something skanky or re-creating the window. The result is that if you set TWindow::fIsResizable to false and remove the ResizeAdorner, the window still interprets clicks in the growRgn as clicks in the growRgn, even though the window isn't supposed to have one.

The solution:

in TWindow::HandleMouseDown
 switch (aPartCode)
 {
   . ( other cases omitted for simplicity )
   .
   .
  case inGrow:
  // This is what I would like changed: if the window is marked as being resizable,
  // than resize it, otherwise treat it as a content click.
   if ( fIsResizable ) {
    this->ResizeByUser(theMouse);
    wasHandled = TRUE;
   }
   else
   // same as inContent above
    wasHandled = TView::HandleMouseDown(theMouse, event, hysteresis, mouseDownType);
   break;
   .
   .
   .
 }
It would be even nicer and more complete to have methods to get and set the resizability of a window, where the set method would add or remove the TResizeAdorner if necessary. Why do I want my windows to resize sometimes and not others? I am doing it in floating palettes, where the palette can change "content panels", and the windows' resizability is dependent on the which panel is active.
Fix:

Implemeted enhancement as requested.


need a method to set resizability of window.

Added a method 'SetIsResizable'.