ExecuteAction

Return to Introduction  Previous page  Next page

Every class based on the POTaskPanelClass must implement this method.

Whenever a task is clicked, this method will be called, and you use this method to implement actions for your tasks.

 

 

Prototype:

ExecuteAction(Long HeaderID, Long TaskID, Long MouseBtn, Long Feq),VIRTUAL

 

Arguments:

HeaderID

This is the uniqe ID of the header in which the clicked task resides.

TaskID

The ID of the task. This value is only unique within it's header

MouseBtn

Which mousebutten was used to activate the task (currently only MouseLeft is supported)

Feq

The "Field Equate Lable" of the control that should be executed.

 

Example:

 

TaskPanel5      Class(POTaskPanelClass)

ExecuteAction       Procedure(Long HeaderID, Long TaskID, Long MouseBtn, Long Feq),VIRTUAL

               End

 

!! Handle Mouse-clicks on tasks

TaskPanel5.ExecuteAction   Procedure(Long HeaderID, Long TaskID, Long MouseBtn, Long Feq)

   Code

   If MouseBtn = MouseLeft

       Case HeaderID

       Of HID:XpTaskpanel

           Select(?Sheet1, TaskID)

           Post(EVENT:NewSelection, ?Sheet1)

           Post(EVENT:Accepted, ?Sheet1)

  

       Of HID:Demos

           Select(?Sheet1, 2+TaskID)

           Post(EVENT:NewSelection, ?Sheet1)

           Post(EVENT:Accepted, ?Sheet1)

  

       Of HID:HideUnhide

           Message('You selected Task ' & TaskID,'Hide/Unhide Demo',ICON:Asterisk,'Ok',1)

       End

   End

 

   If Feq > 0 Then Post(EVENT:Accepted, Feq) .

 

 



Direct link to this page on our website: http://www.icetips.com/manuals/xptaskpanel/executetask.htm