Std CloseActiveWindow: Difference between revisions

From FreeCAD Documentation
No edit summary
(Removed Preferences paragraph.)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:8-->
<!--T:8-->
{{Docnav
{{Docnav
|[[Std_RecentFiles|RecentFiles]]
|[[Std_Open|Std Open]]
|[[Std_CloseAll|Std CloseAllWindows]]
|[[Std_CloseAllWindows|CloseAllWindows]]
|[[Std_File_Menu|File Menu]]
|[[Std_File_Menu|Std File Menu]]
|IconL=Std_Open.svg
|IconL=
|IconR=
|IconR=Std_CloseAllWindows.svg
|IconC=Freecad.svg
|IconC=Freecad.svg
}}
}}


<!--T:2-->
<!--T:2-->
<!--Empty=1 to suppress icon-->
{{GuiCommand
{{GuiCommand
|Name=Std CloseActiveWindow
|Name=Std CloseActiveWindow
|Empty=1
|MenuLocation=File → Close
|MenuLocation=File → Close
|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 25: Line 24:


<!--T:9-->
<!--T:9-->
The '''Std CloseActiveWindow''' command closes the active window in the [[Main_view_area|Main view area]]. To close a document all its windows must be closed.
The '''Std CloseActiveWindow''' command closes the active window. To close a document all its windows must be closed.


==Usage== <!--T:6-->
==Usage== <!--T:6-->
Line 31: Line 30:
<!--T:10-->
<!--T:10-->
# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Select the {{MenuCommand|File → Close}} option from the menu.
#* Select the {{MenuCommand|File → [[Image:Std_CloseActiveWindow.svg|16px]] Close}} option from the menu.
#* Use the keyboard shortcut: {{KEY|Ctrl}}+{{KEY|F4}}.
#* Use the keyboard shortcut: {{KEY|Ctrl}}+{{KEY|F4}}.
# To close the active document: repeat this for all windows belonging to it.
# To close a document: repeat this for all windows belonging to it.
# When closing the last window of a document that has not been saved, a dialog box will prompt you to save it:
# When closing the last window of a document that has not been saved, a dialog box will prompt you to save it:
#* Press the {{Button|Save}} button to save the document. If required enter a filename first.
#* Press the {{Button|Save}} button to save the document. If required enter a filename first.
Line 48: Line 47:
* The command can only close [[Std_ViewDockUndockFullscreen|docked]] windows.
* The command can only close [[Std_ViewDockUndockFullscreen|docked]] windows.
* A document can also be closed by right-clicking it in the [[Tree_view|Tree view]] and selecting {{MenuCommand|Close document}} from the context menu.
* A document can also be closed by right-clicking it in the [[Tree_view|Tree view]] and selecting {{MenuCommand|Close document}} from the context menu.

==Preferences== <!--T:15-->

<!--T:16-->
* The last used file location is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath}}.


==Scripting== <!--T:17-->
==Scripting== <!--T:17-->
Line 61: Line 55:
<!--T:19-->
<!--T:19-->
To close a document use the {{incode|closeDocument}} method of the FreeCAD application. For a scripting example see [[Std_New|Std New]].
To close a document use the {{incode|closeDocument}} method of the FreeCAD application. For a scripting example see [[Std_New|Std New]].



<!--T:20-->
<!--T:20-->
{{Docnav
{{Docnav
|[[Std_RecentFiles|RecentFiles]]
|[[Std_Open|Std Open]]
|[[Std_CloseAll|Std CloseAllWindows]]
|[[Std_CloseAllWindows|CloseAllWindows]]
|[[Std_File_Menu|File Menu]]
|[[Std_File_Menu|Std File Menu]]
|IconL=Std_Open.svg
|IconL=
|IconR=
|IconR=Std_CloseAllWindows.svg
|IconC=Freecad.svg
|IconC=Freecad.svg
}}
}}


</translate>
</translate>
{{Std Base navi{{#translation:}}}}
{{Std_Base_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 19:47, 20 April 2024

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.

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.