Std CloseActiveWindow: Difference between revisions

From FreeCAD Documentation
m (Renatorivo moved page Std Close to Std CloseActiveWindow without leaving a redirect: Part of translatable page "Std Close")
No edit summary
Line 4: Line 4:
{{Docnav
{{Docnav
|[[Std_Open|Std Open]]
|[[Std_Open|Std Open]]
|[[Std_CloseAll|Std CloseAllWindows]]
|[[Std_CloseAllWindows|Std CloseAllWindows]]
|[[Std_File_Menu|File Menu]]
|[[Std_File_Menu|File Menu]]
|IconL=Std_Open.svg
|IconL=Std_Open.svg
Line 19: Line 19:
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|Ctrl}}+{{KEY|F4}}
|Shortcut={{KEY|Ctrl}}+{{KEY|F4}}
|SeeAlso=[[Std_CloseAll|Std CloseAllWindows]]
|SeeAlso=[[Std_CloseAllWindows|Std CloseAllWindows]]
}}
}}


Line 65: Line 65:
{{Docnav
{{Docnav
|[[Std_Open|Std Open]]
|[[Std_Open|Std Open]]
|[[Std_CloseAll|Std CloseAllWindows]]
|[[Std_CloseAllWindows|Std CloseAllWindows]]
|[[Std_File_Menu|File Menu]]
|[[Std_File_Menu|File Menu]]
|IconL=Std_Open.svg
|IconL=Std_Open.svg

Revision as of 20:59, 5 October 2020

Std CloseActiveWindow

Menu location
File → Close
Workbenches
All
Default shortcut
Ctrl+F4
Introduced in version
-
See also
Std CloseAllWindows

Description

The Std CloseActiveWindow command closes the active window. To close a document all its windows must be closed.

Usage

  1. There are several ways to invoke the command:
    • Select the File → Close option from the menu.
    • Use the keyboard shortcut: Ctrl+F4.
  2. To close a document: repeat this for all windows belonging to it.
  3. When closing the last window of a document that has not been saved, a dialog box will prompt you to save it:
    • Press the Save button to save the document. If required enter a filename first.
    • Press the Discard button to discard the document and lose all changes.

Options

  • When the dialog box is displayed: press Esc or the Cancel button to abort the command.

Notes

  • The command can only close docked windows.
  • A document can also be closed by right-clicking it in the Tree view and selecting Close document from the context menu.

Preferences

  • The last used file location is stored: Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath.

Scripting

See also: FreeCAD Scripting Basics.

To close a document use the closeDocument method of the FreeCAD application. For a scripting example see Std New.