|
|
|
|
|
ControlExecuteClosing (Function) In french: ChampExécuteFermeture Runs the closing WLanguage event of an office control and displays its confirmation dialog if necessary.
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)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|