ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Runs the closing WLanguage event of an office control and displays its confirmation dialog if necessary.
Example
// Clic sur le bouton VALIDER
IF NOT ControlExecuteClosing(TBLR_Tableur) THEN
	RETURN
END
Close()
Syntax
<Result> = ControlExecuteClosing(<Office control>)
<Result>: Boolean
  • If the closing WLanguage event of the control returns a value (True or False), <Result> corresponds to this value.
  • If the closing WLanguage event of the control returns no value:
    • if the property Modified on the field is True, a confirmation dialog is displayed: <Result> is False if the user requests the document not to be closed, True otherwise.
    • if the Modified property of the control is set to False, the function returns True.
<Office control>: Control name
Name of office control to use. This control can correspond to:
  • a Spreadsheet control,
  • a Word Processing control,
  • an Image Editor control,
  • a PDF Reader control.
Remarks
  • This function is automatically called by the ribbon of office controls (Spreadsheet, Word Processing, Image Editor or PDF Reader controls) on the following user actions:
    • New.
    • Open.
    • Drag and Drop a document to the control.
  • This function performs the following operations:
    • Running the "Before closing the document" event.
    • If this event returns a value (True or False), the function stops and returns this value.
    • If this event does not return a value:
      • if Modified on the control is set to True, the function displays a confirmation dialog to the user and it returns False if the user asks not to close the document.
      • if the Modified property of the control is set to False, the function returns True.
  • This function can be called for example when closing a window or before a new content is assigned to the control.
  • The following code allows you to display the confirmation dialog only:
    bFermeOK = AAFExecute(TBLR_Tableur, aafClosingDialog)
  • To run only the closing WLanguage event of the document, use the following code:
    ExecuteProcess(TBLR_Tableur, trtBeforeClosingDocument)
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help