Previous topic Next topic
ANIGIF
Help > Controls >

/////////////////////////////////////////////////////////////////////
// ANIGIF
/////////////////////////////////////////////////////////////////////

Creates a control inside a form to play an animated GIF file.
Currently only GIF89a format is supported.

Control creation:

*** Standard syntax:

   @ nRow, nCol ANIGIF Name ;
      [ OBJ Obj ; ]
      [ <OF, PARENT> Parent ; ]
      [ <ACTION, ON CLICK, ONCLICK> bAction ; ]
      [ WIDTH nWidht ; ]
      [ HEIGHT nHeight ; ]
      [ HELPID nHelpid ; ]
      [ INVISIBLE ; ]
      [ RTL ; ]
      [ WHITEBACKGROUND ; ]
      [ BACKCOLOR uBackColor ; ]
      [ FILE cFile ; ]
      [ TOOLTIP cTooltip ; ]
      [ BORDER ; ]
      [ CLIENTEDGE ; ]
      [ DISABLED ; ]
      [ SUBCLASS Subclass ]

*** Alternative syntax:

   DEFINE ANIGIF Name ;
      [ COL nCol ]
      [ ROW nRow ]
      [ OBJECT Obj ]
      [ PARENT Parent ]
      [ <ACTION, ON CLICK, ONCLICK> bAction ]
      [ WIDTH nWidth ]
      [ HEIGHT nHeight ]
      [ HELPID nHelpid ]
      [ <VISIBLE, INVISIBLE> <.T., .F.> ]
      [ RTL <.T., .F.> ]
      [ WHITEBACKGROUND <.T., .F.> ]
      [ FILE cFile ]
      [ TOOLTIP cTooltip ]
      [ BORDER <.T., .F.> ]
      [ CLIENTEDGE <.T., .F.> ]
      [ <ENABLE, DISABLED> <.T., .F.> ]
      [ SUBCLASS Subclass ]
   END ANIGIF

*** OOP syntax:

   [ Obj := ] TAniGIF():Define( cName, [ cParent ], [ nCol ], [ nRow ], ;
      [ cFile ], [ nWidth ], [ nHeight ], [ bAction ], [ nHelpId ], ;
      [ lInvisible ], [ lWhiteBackgroung ], [ lRtl ], [ uBackColor ], ;
      [ cToolTip ], [ lBorder ], [ lClientedge ], [ lDisabled ] )

Notes on clauses:

   1. OBJ and OBJECT set a reference to the control into variable Obj.
      When using OBJECT, the variable must be previously declared.
      When using OBJ, if the variable does not exist, it's created PRIVATE.
   2. PARENT declares which window is the parent (owner) of the control.
      It can be ommited when used inside a DEFINE/END WINDOW structure.
   3. ROW and COL define the position of the control inside it's parent client
      area. Default is 0.
   4. WIDTH and HEIGHT define the dimension of the control. Default is 0.
   5. DISABLED specifies that the control can't receive mouse clicks and
      pressed keys. Default is ENABLED.
   6. SUBCLASS indicates that the control must be an instance of the specified
      class, instead of the default TActiveX class.
   7. VISIBLE and INVISIBLE specify if the control must be visible/hidden when
      created. Default is VISIBLE.
   8. RTL specifies that the control must have WS_EX_LTRREADING, WS_EX_LEFT and
      WS_EX_LEFTSCROLLBAR styles.
      Default is .F.
   9. HELPID associates a help topic within the current help file to the
      control. Default is 0.
  10. FILE specifies that the control must load and show the firt frame of the
      indicated GIF file. Default is NIL.
  11. TOOLTIP sets a text that will be display when the mouse is positioned
      over the control. Default is NIL.

Notes on parameters:

   1. nHelpid, nRow, nCol, nWidth and nHeight must be numbers.
   2. Name and Parent must be valid identifiers enclosed or not within quotes.
   3. cFile and cTooltip must be strings.
   4. Obj and Subclass must be valid identifiers not enclosed within quotes.
   5. cName and cParent must be strings containing valid identifiers.
   6. lInvisible, lWhiteBackgroung, lRtl, lBorder, lClientedge and lDisabled
      must be .T. or .F.
   7. bAction must be a valid codeblock.
   8. uBackColor must be a valid color (number, array of string).