Small form window fills the screen when entering graphics mode


#1

When a form window is below a certain size - maybe about 3 inches square (I haven’t bothered to chase down the precise dimensions), clicking on the Graphics Mode icon causes the window to expand to fill the entire screen which can be quite disconcerting. Is this a bug or a feature?


#2

Feature.

The window has to be large enough to display the inspector panel and object library on the right.

At one point, it expanded to full screen every time you went into Graphics Mode, no matter how big the window was originally. That was really disconcerting. I agree that it still is not ideal, but there is no perfect solution here. If I’m going to be going into graphics mode a lot, I usually make sure that the window is big enough so that this doesn’t happen.

(This reply was originally one word – feature. Discourse wouldn’t allow less than 10 characters, so you got a lot more!)


#3

I would think that if Panorama is smart enough to know what the minimum size is to necessitate the form expanding when going into graphics mode it should be smart enough to expand the form only large enough to meet those requirements if it is currently undersized. In other words, there must be a minimum width and a minimum height that could also be used to set the new dimensions if needed.

I have gotten use to expanding small windows before entering graphics mode but still occasionally forget and have the window blossom into full screen mode. Since I have a load of objects in my dock it extends across the entire bottom of my screen and can make it difficult to grab the lower corner of the expanded form to resize it.


#4

I would think that if Panorama is smart enough to know what the minimum size is to necessitate the form expanding when going into graphics mode it should be smart enough to expand the form only large enough to meet those requirements if it is currently undersized.

Although this thread has been long dormant, I’d like to add my support for Gary’s suggestion as it still applies nearly two years later. Switching small form windows to graphic mode on large screens results in screen-filling forms which are a struggle to cope with. Added to this inconvenience is the fact that the form does not necessarily return to its starting size when switched back to data mode (usually following a long period in graphics mode).


#5

I agree that this is small annoyance. But one thing I discovered is that after you return to Data Mode you can double-click the window menu bar and the window will resize to the dimensions set in the Window Pane. That discovery substantially reduced the annoyance of the window not returning to the starting size.


#6

Tom, this would be good if I could get it to work.

By the window pane do you mean the form properties pane (in which to enter the form dimensions)? Having entered the window size there (in both the minimum and maximum sizes), when I double-click the window menu bar after returning to data mode, the enlarged window size does not reset.


#7

Here is an illustration of what I meant to say:

  1. Set the dimensions; 2. return to Data Mode 3. double-click the menu bar. (Is that the correct name for that part of a window? I am not sure.)

I also added to many windows a little grey box that will resize and move the window, hide the toolbar and turn off the scroll bars.

formxy 0,0
closeactiveobject
setwindowoptions "TOOLBAR","NO","SCROLLBARS","NO"
zoomwindow 115,700,680,695
Alignform "right"

Maybe I or somebody will write a custom statement that will return the window to the size set in the ‘Window Size’ pane, and do the other things. I assume the window size parameters are accessible with the objectinfo( function.


#8

Upon looking, I do not see any way to extract the Maximum/Minimum dimensions of a window in a procedure. Objectinfo() does not work with windows, only objects. The most promising function, Windowinfo(, does not see to offer this an option.


#9
local theOptions,minHeight,maxHeight,minWidth,maxWidth
formblueprint "","MyForm",theOptions,"formoptions",true()
minHeight=tagdata(theOptions,{"MINIMUMHEIGHT",},",",1)
maxHeight=tagdata(theOptions,{"MAXIMUMHEIGHT",},",",1)
minWidth=tagdata(theOptions,{"MINIMUMWIDTH",},",",1)
maxWidth=tagdata(theOptions,{"MAXIMUMWIDTH",},",",1)

#10

Thanks, Gary. That worked perfectly.


#11

Investigating this, it turns out that there are several inadvertently undocumented options in the getformoption( function – “MINIMUMHEIGHT”, “MAXIMUMHEIGHT”, “MINIMUMWIDTH” and “MAXIMUMWIDTH”. So that function would be the recommended method for determining these values (using the blueprint will be much slower because it does a lot of work to generate all of the object information, plus you have to parse out the information you want).

let minHeight = getformoption("","MyForm","MINIMUMHEIGHT")
let minHeight = getformoption("","MyForm","MINIMUMHEIGHT")
let minWidth = getformoption("","MyForm","MINIMUMWIDTH")
let maxWidth = getformoption("","MyForm","MAXIMUMWIDTH")

If you can find a value in a blueprint, it is guaranteed that there is an underlying function that returns that value. All of the blueprint statements are custom statements that use underlying functions to do their job.

Panorama is using Apple’s window zoom feature to do this. The window zoom feature normally zooms to full screen. Panorama could do something different by implementing this itself instead of using the underlying Apple feature, or by tricking the Apple feature, but there have been a lot of other worthy projects to work on.

If you leave the window fully zoomed while in graphics mode, it will always zoom back down to the correct size when going to data mode. The only time it doesn’t go back to the original size is when you fiddle with the window size while in graphics mode. So if possible, don’t fiddle with the window size in graphics mode.


#12

Tom, I can’t get this to work following your instructions and double clicking on the window toolbar in data mode. However I just discovered that my Mac does resize to the window size settings by double clicking the window’s bottom right-hand corner in data mode, after the cursor turns into the little arrow pointing diagonally across the window. This is almost as easy as clicking the toolbar, so thanks for the tip!


#13

Just discovered it also resizes by double clicking any of the little arrows that appear when you place your cursor on any edge of the window after switching to data mode.


#14

Dag nab it, I was going to try that with the getformoption( function when I first looked at the problem but decided it would be a waste of time since the Help docs did not have it listed.