PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Executing the "Wrap/Unwrap" event
  • Calling a global component procedure
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
ExecuteProcess (Function)
In french: ExécuteTraitement
Launches the execution of an event or processing by programming, i.e. without the user having to perform any particular manipulation in the interface.. The event/processing carried out can be:
  • an event of an control (of a window, a page or an report),
  • an event of a menu item,
  • an report block event,
  • a window event,
  • a one-page event,
  • an report event,
  • a process of a procedure.
    Versions 17 and later
    Remark: To trigger the execution of a procedure by the main application thread, use ExecuteMainThread.
    New in version 17
    Remark: To trigger the execution of a procedure by the main application thread, use ExecuteMainThread.
    Remark: To trigger the execution of a procedure by the main application thread, use ExecuteMainThread.
PHP The event/process executed can be only a processing of a field of a page, a page or an Procedure. Called in server code, only the server code of the element is executed. Called in browser code, the browser code and server code of the element are run.
Java The event/process executed can be only a processing of a window field, a menu item, a window or an Procedure.
Example
// Runs the click code on a button
ExecuteProcess(BTN_Save, trtClick)
// Runs a local procedure (test) that belongs
// to another opened window/page (menu)
ExecuteProcess(Menu.Test, trtProcédure)
// Runs the ReadFile procedure
// and passes the file name in parameter
ExecuteProcess(ReadFile, trtProcédure, FileName)
Syntax

Execute an associated event at an control Hide the details

ExecuteProcess(<Control used> , <Process>)
<Control used>: Control name
Name of the control (or menu option) associated with the process (or event) to run. For an option in a popup menu, use the following notation: <Name of popup menu>.<Option name>.
<Process>: Integer constant
Event to execute among the available WLanguage events of the:
Versions 22 and later
trtAction
New in version 22
trtAction
trtAction
Action code of Web Component control. This code is available in server code and in browser code.
Java This constant is not available.
Versions 22 and later
trtValueAssignment
New in version 22
trtValueAssignment
trtValueAssignment
Code for assigning the Value property of Web Component control. This code is available in browser code only.
Java This constant is not available.
trtLineDisplayCode used to display a row (Table control only).
Versions 24 and later
trtAddToken
New in version 24
trtAddToken
trtAddToken
Code for adding a token into a "Text token" edit control.
Java This constant is not available.
Versions 20 and later
trtAddWidget
New in version 20
trtAddWidget
trtAddWidget
Code for adding a widget to a Dashboard control.
Java This constant is not available.
Versions 26 and later
trtEndLoadingHTMLPage
New in version 26
trtEndLoadingHTMLPage
trtEndLoadingHTMLPage
"After loading the HTML page" code of an HTML Display control.
Java This constant is not available.
Versions 23 and later
trtAfterOpeningDocument
New in version 23
trtAfterOpeningDocument
trtAfterOpeningDocument
"After opening document" code of Word Processing control, Image Editor control, Spreadsheet control or PDF Reader control.
Java This constant is not available.
Versions 26 and later
trtStartLoadingHTMLPage
New in version 26
trtStartLoadingHTMLPage
trtStartLoadingHTMLPage
"Before loading the HTML page" code of an HTML Display control.
Java This constant is not available.
Versions 15 and later
trtBeforeCreatingOrganizerApt
New in version 15
trtBeforeCreatingOrganizerApt
trtBeforeCreatingOrganizerApt
"Before creating the appointment" code of Organizer control.
Java This constant is not available.
Versions 16 and later
trtBeforeCreatingScheduleApt
New in version 16
trtBeforeCreatingScheduleApt
trtBeforeCreatingScheduleApt
"Before creating the appointment" code of Scheduler control.
Java This constant is not available.
Versions 23 and later
trtBeforeClosingDocument
New in version 23
trtBeforeClosingDocument
trtBeforeClosingDocument
"Before closing document" code of Word Processing control, Image Editor control, Spreadsheet control or PDF Reader control.
Java This constant is not available.
Versions 15 and later
trtChangeOrganizerPeriod
New in version 15
trtChangeOrganizerPeriod
trtChangeOrganizerPeriod
"Whenever changing period" code of Organizer control.
Java This constant is not available.
Versions 16 and later
trtChangeSchedulePeriod
New in version 16
trtChangeSchedulePeriod
trtChangeSchedulePeriod
"Whenever changing period" code of Scheduler control.
Java This constant is not available.
Versions 22 and later
trtChangePlane
New in version 22
trtChangePlane
trtChangePlane
"Whenever changing plane" code of a Sliding Banner control.
Java This constant is not available.
Versions 20 and later
trtChangePositionMap
New in version 20
trtChangePositionMap
trtChangePositionMap
"Whenever changing position" code of Map control.
Java This constant is not available.
Versions 20 and later
trtResizeWidget
New in version 20
trtResizeWidget
trtResizeWidget
"Resizing a Widget" code of Dashboard control.
Java This constant is not available.
Versions 22 and later
trtDelayedPlaneLoad
New in version 22
trtDelayedPlaneLoad
trtDelayedPlaneLoad
"Delayed plane load" code of a plane.
Java This constant is not available.
Versions 26 and later
trtLoadingHTMLResource
New in version 26
trtLoadingHTMLResource
trtLoadingHTMLResource
Code "Resource loading" of an control HTML editor or an control HTML display.
Java This constant is not available.
trtClickClick code of control.
trtRightClickRight-click code (for the TreeView control only).
Versions 26 and later
trtRightClickHTMLLink
New in version 26
trtRightClickHTMLLink
trtRightClickHTMLLink
"Right click on a link" code of an HTML Display control.
Java This constant is not available.
Versions 22 and later
trtClickButtonArrow
New in version 22
trtClickButtonArrow
trtClickButtonArrow
Click code on the arrow associated with a button.
Java This constant is not available.
Versions 24 and later
trtClickToken
New in version 24
trtClickToken
trtClickToken
Click code on a token in a "Text token" edit control.
Java This constant is not available.
Versions 26 and later
trtClickHTMLLink
New in version 26
trtClickHTMLLink
trtClickHTMLLink
"Click on a link" code of an HTML Display control.
Java This constant is not available.
Versions 15 and later
trtMoveOrganizerApt
New in version 15
trtMoveOrganizerApt
trtMoveOrganizerApt
Code for moving an appointment in an Organizer control.
Java This constant is not available.
Versions 16 and later
trtMoveScheduleApt
New in version 16
trtMoveScheduleApt
trtMoveScheduleApt
Code for moving an appointment in a Scheduler control.
Java This constant is not available.
Versions 20 and later
trtMoveWidget
New in version 20
trtMoveWidget
trtMoveWidget
"Moving a Widget" code of Dashboard control.
Java This constant is not available.
trtDoubleClickDouble-click code.
trtCollapseExpandBranchCollapsed/Expanded code of a node in a TreeView or TreeView Table control.
Caution: This parameter requires a specific syntax. For more details, see the remarks.
Java This constant is not available.
Versions 22 and later
trtCollapseExpandBreak
New in version 22
trtCollapseExpandBreak
trtCollapseExpandBreak
Collapsed/Expanded code of a break in a Looper or Table control.
Java This constant is not available.
Versions 25 and later
trtCollapseExpandDrawer
New in version 25
trtCollapseExpandDrawer
trtCollapseExpandDrawer
Browser code run each time the Drawer control is collapsed or expanded.
Java This constant is not available.
trtEnterEntry code in the control.
trtLineEnterEntry code of a row (Table control only).
Java This constant is not available.
Versions 15 and later
trtEnterInputOrganizerApt
New in version 15
trtEnterInputOrganizerApt
trtEnterInputOrganizerApt
Entry code in input for an appointment in an Organizer control.
Java This constant is not available.
Versions 16 and later
trtEnterInputSchedulerApt
New in version 16
trtEnterInputSchedulerApt
trtEnterInputSchedulerApt
Entry code in input for an appointment in a Scheduler control.
Java This constant is not available.
trtComboClosingClosing code of drop-down list.
trtEndInitialization"End of initialization" code (browsing List Box, Table and Combo Box control).
trtEndChange"End of modification" code (Slider and Scrollbar control only).
trtInitInitialization code of control.
trtReadLastCode for reading the last record (Table control only)
trtReadPreviousCode for reading the previous record (Table control only).
trtReadFirstCode for reading the first record (Table control only).
trtReadNextCode for reading the next record (Table control only).
trtChange"Whenever modified" code of control.
Versions 22 and later
trtModificationSpreadsheetCell
New in version 22
trtModificationSpreadsheetCell
trtModificationSpreadsheetCell
"Cell modification" code of Spreadsheet control.
Java This constant is not available.
Versions 24 and later
trtModificationColumnFilter
New in version 24
trtModificationColumnFilter
trtModificationColumnFilter
Code "Whenever modifying the filter (user input in header)" of a Table Column control.
Java This constant is not available.
trtSliderChange"Whenever modified" code (Slider control only).
Java This constant is not available.
Versions 15 and later
trtZoomModification
New in version 15
trtZoomModification
trtZoomModification
Code for modifying the zoom of a Range Slider control.
Java This constant is not available.
trtMenuOptionCode of menu option (main or popup menu).
trtComboOpeningCode for opening the drop-down list of Combo Box control.
Versions 23 and later
trtRefreshRibbon
New in version 23
trtRefreshRibbon
trtRefreshRibbon
Code for refreshing the ribbon of PDF Reader and Word Processing controls.
Java This constant is not available.
Versions 16 and later
trtReassignResourceScheduleApt
New in version 16
trtReassignResourceScheduleApt
trtReassignResourceScheduleApt
Code for re-assigning an appointment in a Scheduler control.
Java This constant is not available.
Versions 22 and later
trtValueRetrieval
New in version 22
trtValueRetrieval
trtValueRetrieval
Code for retrieving the Value property of a Web Component control. This code is available in browser code only.
Java This constant is not available.
Versions 15 and later
trtResizeOrganizerApt
New in version 15
trtResizeOrganizerApt
trtResizeOrganizerApt
Code for resizing an appointment in an Organizer control.
Java This constant is not available.
Versions 16 and later
trtResizeScheduleApt
New in version 16
trtResizeScheduleApt
trtResizeScheduleApt
Code for resizing an appointment in a Scheduler control.
Java This constant is not available.
trtSelectionSelection code (Combo Box, List Box and Table control).
Versions 15 and later
trtSelectOrganizerPeriod
New in version 15
trtSelectOrganizerPeriod
trtSelectOrganizerPeriod
Code for selecting a period in an Organizer control.
Java This constant is not available.
Versions 16 and later
trtSelectSchedulePeriod
New in version 16
trtSelectSchedulePeriod
trtSelectSchedulePeriod
Code for selecting a period in a Scheduler control.
Java This constant is not available.
Versions 15 and later
trtSelectOrganizerApt
New in version 15
trtSelectOrganizerApt
trtSelectOrganizerApt
Code for selecting an appointment in an Organizer control.
Java This constant is not available.
Versions 16 and later
trtSelectScheduleApt
New in version 16
trtSelectScheduleApt
trtSelectScheduleApt
Code for selecting an appointment in a Scheduler control.
Java This constant is not available.
trtExitExit code of control.
trtLineExitExit code of row (Table control only).
Versions 15 and later
trtOrganizerInputExitApt
New in version 15
trtOrganizerInputExitApt
trtOrganizerInputExitApt
Exit code from input for an appoingment in an Organizer control.
Java This constant is not available.
Versions 16 and later
trtScheduleInputExitApt
New in version 16
trtScheduleInputExitApt
trtScheduleInputExitApt
Exit code from input for an appoingment in a Scheduler control.
Java This constant is not available.
trtSpinPlusIncrement code of Spin control.
trtSpinMinusDecrement code of Spin control.
Versions 24 and later
trtDeleteToken
New in version 24
trtDeleteToken
trtDeleteToken
Code for deleting a token from a "Text token" edit control.
Java This constant is not available.
Versions 15 and later
trtDeleteOrganizerApt
New in version 15
trtDeleteOrganizerApt
trtDeleteOrganizerApt
Code for deleting an appointment from an Organizer control.
Java This constant is not available.
Versions 16 and later
trtDeleteScheduleApt
New in version 16
trtDeleteScheduleApt
trtDeleteScheduleApt
Code for deleting an appointment from a Scheduler control.
Java This constant is not available.
Versions 20 and later
trtDeleteWidget
New in version 20
trtDeleteWidget
trtDeleteWidget
Code for deleting a widget from a Dashboard control.
Java This constant is not available.
Versions 20 and later
trtPullToRefresh
New in version 20
trtPullToRefresh
trtPullToRefresh
"Pull to refresh" code of a Table or Looper control.
Java This constant is not available.


Control or block of a report: Event to be executed among the available WLanguage events:
trtPrePrint"Pre Print" code of control or block.
PHP This constant is not available.
trtPostPrint"Post Print" code of a block.
PHP This constant is not available.
Reports and QueriesJavaUser code (UMC)

Execute a WLanguage associated event at a window Hide the details

ExecuteProcess(<Window used> , <Process>)
<Window used>: Window name
Name of the window for which a WLanguage event is to be executed.
<Process>: Integer constant
Event to be executed among the WLanguage events available for the windows.
trtOpening or trtInitInitialization code of the window.
trtClosingClosing code of the window.
trtGetFocusCode of focus gain for the window.
trtKillFocusCode of focus loss for the window.
trtResizeCode for resizing the window.
trtClickCode of the button associated with the click in the window.
trtRightClickCode of button associated with the right click in the window.
trtDoubleClickCode of button associated with the double click in the window.
trtChangeModification code of the window.
trtSystemButton"Before closing with OK/Close button" code.
Versions 24 and later
trtRequestRefresh
New in version 24
trtRequestRefresh
trtRequestRefresh
"Request for updating the display" code.
Versions 23 and later
trtChangeLayout
New in version 23
trtChangeLayout
trtChangeLayout
"Change of layout" code.
Versions 26 and later
trtBeforeClosingWindow
New in version 26
trtBeforeClosingWindow
trtBeforeClosingWindow
Code "Authorization to close".
Java This constant is not available.
PHPAjax

Execute a WLanguage associated event to a page Hide the details

ExecuteProcess(<Page manipulated> , <Process>)
<Page manipulated>: Page name
Name of the page from which to execute a WLanguage event.
PHP The name of the page must be enclosed in quotes.
<Process>: Integer constant
Event WLanguage to be executed among the WLanguage events available for the pages.
trtOpening
trtClosing
PHP This constant has no effect.
trtInit
Versions 22 and later
trtChangeSlice
New in version 22
trtChangeSlice
trtChangeSlice
trtLoad
trtUnload
Versions 22 and later
trtScroll
New in version 22
trtScroll
trtScroll
Versions 25 and later
trtChangeLayout
New in version 25
trtChangeLayout
trtChangeLayout
trtRequestRefresh
trtReset
trtSubmit
Reports and QueriesUser code (UMC)

Execute a WLanguage associated event at an report Hide the details

ExecuteProcess(<Report used> , <Process>)
<Report used>: Report name
Name of the report whose process must be run.
<Process>: Integer constant
Event to be executed among the WLanguage events available for reports.
trtOpening or trtInitOpening code of report.
trtClosingClosing code of report.
trtReadDataCode for reading the report data.
trtFilterCode for filtering the report data.
Reports and QueriesJavaUser code (UMC)PHPAjax

Running an Procedure WLanguage Hide the details

<Result> = ExecuteProcess(<WLanguage procedure> , <Process> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Any
Return value of procedure called. This value is identical to the value obtained if the procedure is run directly.
<WLanguage procedure>: Procedure name
Name of procedure to run.
<Process>: Integer constant
Procedure to run. This procedure corresponds to:
<Parameter 1>: Any optional type
First optional parameter that will be passed to the procedure.
<Parameter N>: Any optional type
Nth optional parameter that will be passed to the procedure.
Remarks
User code (UMC)

Executing the "Wrap/Unwrap" event


For a TreeView control
0
  • <Element path>: Text variable containing the full path of the element currently collapsed or expanded. Simply specify the name of a variable. It will be automatically initialized at runtime.
  • <Collapsed>: Boolean variable, used to find out the action performed by the user (collapse = True, expand = False). Simply specify the name of a variable. It will be automatically initialized at runtime.
When executing this event with the ExecuteProcessfunction, it is also necessary to specify these two parameters. In this case, the following syntax must be used:
0
For more details on the "Wrapped / Unwrapped" code of an TreeView control, see WLanguage events associated with TreeView control.
For a TreeView Table control
The event WLanguage "Wrap / Unwrap" of an TreeView Table control under the code editor does not expect any parameter.
When executing this event with the ExecuteProcessfunction, the syntax to use is as follows:
0
Reports and QueriesUser code (UMC)Ajax

Calling a global component procedure

ExecuteProcess is used to call a global component procedure. To do so, use the following syntax:
ExecuteProcess(<Component>.<Set of procedures>.<Procedure>, ...
trtProcedure)
Example:
ExecuteProcess("MyComponent.Set_WDExample.MyProcedure", trtProcédure)
In a thread started by a component, ExecuteProcess cannot be used to call a local procedure of a window of the host project.
You must use a global procedure of the host project to call the local procedure of the window.
Business / UI classification: Neutral code
Component: wd260vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
I AM MAKING IT DIRECT TO ANOTHER BOTTLE, AND PERFORMING, LIKE IT WAS A CLICK
ExecuteProcess(BTN_BOTAO2,trtClick)

// ESTOU FAZENDO ELE IR DIRETO PARA OUTRO BOTAO, E EXECUTAR, COMO SE FOSSE UM CLICK
// I AM MAKING IT DIRECT TO ANOTHER BOTTLE, AND PERFORMING, LIKE IT WAS A CLICK
// HACIENDO EL IR DIRECTO A OTRO BOTA, Y EJECUTAR, COMO SE FUE UN CLICK

// BLOG COM VIDEO E EXEMPLO

http://windevdesenvolvimento.blogspot.com.br/2017/07/aula-1198-windev-02-button-botao-ir.html

https://www.youtube.com/watch?v=m6KEcLWWsiM
De matos
05 Jul. 2017