It's somewhat analogous to how to don't let the user resize table view columns that are relative or default width -- only absolute-width columns can be resized by the user. We *could* allow such behavior, but doing so would cause the user to immediately blow away the fact that the column was default-width or relative-width, and replace it with the absolute width.
-T On Tue, Oct 27, 2009 at 10:15 AM, Greg Brown <[email protected]> wrote: > No, "restore" restores the most recent preferred size when returning from a > "maximized" or "minimized" state. > > Window size is determined by the window's preferred size values. These can > either be calculated automatically by the window skin, or set explicitly by > the caller. When the window size has been explicitly set, we allow the user > to resize the window. However, when it is automatically determined, we > don't. This applies to both width and height. > > For example, a window's preferred size could be set to 320 x -1. This > means, "use a width of 320, but determine my height automatically". In this > case, we would allow the user to change the window's width, but not its > height. However, if a window's preferred size is set to 320 x 240, we would > allow the user to resize both dimensions. If the preferred size is set to -1 > x -1, we would not allow the user to resize the window at all (because the > caller has indicated that the size should be determined automatically). > > Does that help? > > > On Tuesday, October 27, 2009, at 10:04AM, "Noel Grandin" < > [email protected]> wrote: > > > >I must be slow today - I don't get it. > > > >If there is a preferred width or height set, the window can use that to > >implement the restore function. > > > >Surely, if there is no explicitly set width/height, the restore function > >will just restore to the "natural" size?? > > > > > >Greg Brown wrote: > >> If the preferred size is not explicitly set, the window is set to its > default size and we disallow resizing. Otherwise, we allow the user to > change the size. > >> > >> We could allow the user to resize the window in either case, but then > there would be no way for the user to tell the window to revert to its > automatically calculated preferred size. We could add a button to the window > trim that supported this, but for now we just disallow resizing in this > case. > >> > >> > >> On Tuesday, October 27, 2009, at 09:43AM, "Noel Grandin" < > [email protected]> wrote: > >> > >>> Hi > >>> > >>> I'm looking at resizing support for Sheet, which is so far a pretty > >>> copy'n'paste of the code from Frame, but one thing I don't get - the > way > >>> Pivot handles preferred-size. > >>> > >>> Why is resizing support on Frame conditional on a preferred-width or a > >>> preferred-height being set? > >>> > >>> Thanks, Noel. > >>> > >>> > >>> > > > > > > >
