AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Diagrama de Gantt
  • Default events
  • Events with procedures for quick use
  • Advanced use of events with procedures
  • Optional events
  • Sort code of a column
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Events associated with a Gantt Chart column
Default events
WINDEV manages the following events by default for a "Gantt Chart" column (in order of appearance in the code editor):
EventRuntime condition
InitializationExecuted when the window is opened. *
Before creating the taskExecuted when selecting "New task" in the context menu of the "Gantt Chart" column.
Entry in input in a taskExecuted when selecting "New task" in the context menu of the "Gantt Chart" column. This event is run immediately after the "Before creating the task" event.
Exit from task inputRun during the exit from task input (exit when adding a task or when modifying a task via the context menu for example).
Select a taskExecuted when selecting a task found in the "Gantt Chart" column. This event is executed when the context menu opens.
Moving a taskExecuted when moving a task in the "Gantt Chart" column (move performed with the mouse for example).
Resizing a taskExecuted when resizing a task in the "Gantt Chart" column (resize operation performed with the mouse for example).
Deleting a taskExecuted when selecting "Delete the task" in the context menu of the "Gantt Chart" column.
After linking a prerequisite task to a taskRun once the link was created via the context menu (select "Link a prerequisite task" and click the prerequisite task).
Modifying the progress of a taskExecuted when the user changes the cursor of the progression bar in the task.

(*) By default, the "Initialization" event of each control is executed according to the order in which the controls were created in the window. To modify this runtime order:
  1. On the "Ventana" tab, in the "Orden" group, click "Inicialización".
  2. In the window that appears, use the arrows on the right to change the order in which the controls are initialized.

Events with procedures for quick use

Most of the events associated with the Gantt Chart column are run:
  • when using the context menu of the "Gantt Chart" column.
  • when using the mouse.
To handle tasks more easily, several procedures appear in each event. These procedures take as parameter:
All the characteristics of the element handled by the context menu or by the mouse are automatically assigned to this variable.
Example: To store a task that the user adds via the context menu in a "Task" data file, simply enter in the "Task entry" event:
PROCEDURE EnterInInput(gtEdited is GanttTask)

// Store the data
Task.Title = gtEdited.Title
Task.StartDate = gtEdited.StartDate
Task.EndDate = gtEdited.EndDate
...
HAdd(Task)

Advanced use of events with procedures

You can also allow the user to define more precisely the characteristics of his task during an addition or a modification.
To do so, create a window with the information to specify.
In the code, simply open the window in the "Enter the task in input" event. To lock the direct input via the context menu of the column, the event must return False.
This principle can be applied to all the events called by the context menu of the column.
Example:
PROCEDURE EnterInInput(gtEdited is GanttTask)

// Opens the window for task input
// with the selected task (in Creation or Modification mode)
Open(WIN_TaskInput, gtEdited)

// Returns False to lock the direct input in the column
RETURN False
Optional events
Several optional events can be added. To add an optional event:
  1. Select the desired control.
  2. Display the code window of this control (F2 key).
  3. Click the link "Add other events to xxx" at the bottom of the window code, after the last event.
  4. All the optional events available for the control are displayed.
  5. Check the optional event to add and validate.
    Note: Several optional events can be selected.
  6. The selected optional event is automatically added to the events managed by the control.
To disable an optional event, simply perform the same operations to display the list of optional events. Then simply uncheck the optional events to delete.
Note: If the deactivated code contains WLanguage code, this code is automatically deleted..
You can manage:
  • how columns are sorted (event "Whenever sorting"). This event is executed when the user sorts the column with and .
  • how the magnifier is used to perform a search (event "Whenever performing a search with the magnifier"). This event is run during the search (for each character typed) from the "magnifier" search control.
  • The column resized by the user.

Sort code of a column

When the user clicks the title of a table column, the sort code of column is automatically called.
To find out the sort direction, declare a parameter at the beginning of the sort code.
// -- Whenever COL_Gantt is sorted
PROCEDURE Sort_col(bAscending)
Trace(bAscending? "Ascending column sort" ELSE "Descending sort")
Versión mínima requerida
  • Versión 19
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 04/10/2024

Señalar un error o enviar una sugerencia | Ayuda local