GetAction (return FormVCR action)

Top  Previous  Next

 

GetAction( ), BYTE, VIRTUAL

GetAction

Detect that an action has taken place.

The GetAction method is a virtual method used by the ToolBarClass to detect and process actions posted by the FormVCR class.

Implementation:

The GetAction method is called from the ToolbarFormVCRClass to detect an actionand enable/disable buttons where appropriate.

Example:

 

ToolbarFormVCRClass.DisplayButtons PROCEDURE

 CODE

   IF SELF.FormVCR.GetAction()=InsertRecord THEN

      ENABLE(Toolbar:History)

   ELSE

      DISABLE(Toolbar:History)

   END

   Toolbar:Bottom{PROP:DISABLE}    =|

CHOOSE(SELF.FormVCR.GetActionAllowed(EVENT:ScrollBottom,0),False,True)

   Toolbar:Top{PROP:DISABLE}       =|

CHOOSE(SELF.FormVCR.GetActionAllowed(EVENT:ScrollTop,0),False,True)

   Toolbar:PageDown{PROP:DISABLE}  =|

CHOOSE(SELF.FormVCR.GetActionAllowed(EVENT:PageDown,0),False,True)

   Toolbar:PageUp{PROP:DISABLE}    =|

CHOOSE(SELF.FormVCR.GetActionAllowed(EVENT:PageUp,0),False,True)

   Toolbar:Down{PROP:DISABLE}      =|

CHOOSE(SELF.FormVCR.GetActionAllowed(EVENT:ScrollDown,0),False,True)

   Toolbar:Up{PROP:DISABLE}        =|

CHOOSE(SELF.FormVCR.GetActionAllowed(EVENT:ScrollUp,0),False,True)

 

   DISABLE(Toolbar:Locate)

   PARENT.DisplayButtons