homeDir=expandpath("~") panel = buildWindow(height=360,width=640) #force the output size to be what I want panel[0].setFullScreenSize(640,360) panel[0].setFullScreen()
I was able to run a background script (not from the jython shell) using buildWindow(width=50,height=50) and successfully created a movie that was exactly that size. Are you running from the jython shell or from background? Creating a window through the jython shell requires that the window includes the buttons and menu items.
Commands which are run from a script should produce consistent results whether or not they are run within a McIDAS-V session jython shell, or run in the background.
When writing a script and building a window in most software packages, the window display size is defined and consistent whether the script is run in foreground or background.
When users build a display, would they really define the width of the final image as (width+the width of the button controls). If this is true, the margin needed for button controls must be documented.
The current situation is even less intuitive than just allowing for the button controls and menu items because the result is not (defined height+some margin for button controls)X(defined width+some margin for button controls). It is (defined width+some margin for button controls)X(defined height). If the disparity between defined size and the final image size is due to extra controls, then both height and width should be affected.
For these reasons, I believe the current behavior is incorrect.
Documenting the exact size is difficult as it changes between operating systems. Additionally, user defined buttons are not likely to be of uniform size. I have written up an inquiry allow buildWindow to create a window without a toolbar. You would not be able to interactively work with the window, but you could still make changes with commands via a jython shell. Another possibility to create a smaller window is to remove as many buttons as possible.
I am sorry that I am not understanding this problem quickly. Is the problem that when fullScreenSize is used to define the exact display size, this only works on macs? Why should buttons on the frame matter and if they do, why does the problem only affect the width?
I tested the screen size by removing every side bar, when created via buildWindow, there is no attached legend. If the argument that the buttons are causing the problem is true, then I would expect that removing all the navigation toolbars would solve the problem. The final size of a defined 640x360 is still 695x360.
Thanks, Joleen
Window created via jython shell without any navigation toolbars
The size limitation is not only due to the buttons (for example the Stop Sign and remove layers/data), but also the menu items (for example File and Tools) These are required in the foreground. Per our discussion, I'm also adding two additional potential solutions to the inquiry:
The first would be to stack the buttons and menu items if they don't fit inside the size of the requested window (see Microsoft word for an example). The second is to 'eject' the tool bar (buttons and menu items) similar to the Legend.
Thanks Rick. The main reason we discussed the other options (i.e. eject tool bar or to mimic behavior of toolbars in software like Firefox and Microsoft Word when window width does not allow room for all toolbar items), is to maintain current functionality while still addressing the issue of screen size. Thank-you for the update.