Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Cancel property is automatically set to 0 before the OnDragStart or BeforeUpdate events are fired. These events fire when a user starts and operation but before the operation is truly applied. If the operation is not desired, then setting this property to 1 during the event will abort the operation. Note that this only works if you qualify the aforementioned events synchronously.

...

Code Block
OLE_TREE.OnDragStart: 

   // Get the list of items to be dragged 
   Items = Param1 
   Convert ',' to @FM in Items 
    
   // Don't allow users to drag if any of the items are of the "Group" class 
   Cancel = 0 
   Pos = 1 
   Flag = "" 
   Loop 
       Remove Item From Items At Pos Setting Flag 
   While Item NE "" AND Cancel EQ 0 
       Class = Get_Property(CtrlEntId, "OLE.ItemClass[":Item:"]") 
       Cancel = Class _EQC "Group" 
   Repeat 
    
   // Cancel if need be 
   Set_Property(CtrlEntId, "OLE.Cancel", Cancel) 
    
return

See Also

BeforeUpdate, DefCancel, OnDragStart