Class CustomPopupMenu

(line 376)

Description

Object
   |
   --Persistent
      |
      --Component
         |
         --CustomPopupMenu

Located in File: /menus.inc.php

Base class for PopupMenu.

Use PopupMenu to define the pop-up menu that appears when the user clicks on a control with the right mouse button.

To make a pop-up menu available, assign the PopupMenu object to the control's PopupMenu property.



Classes extended from CustomPopupMenu:
PopupMenu
Use PopupMenu to define the pop-up menu that appears when the user clicks on a control with the right mouse button.

Properties

Summary:
Images Lists the images that can appear beside individual menu items.
Items Describes the elements of the menu.

Defined in class Component

Name Specifies the name for the component. The name is used as an identifier and should be unique.
Tag A versatile property of every Component that can be used in any way you want
ComponentCount Indicates the number of components owned by the component.
Components Lists all the components owned by this component.
ControlState A flag to know the state of the control, csLoading, csDesigning
DataFieldValue This property returns the value of the datafield if any.
NamePath Specifies the path to uniquely identify a component, qualified by the owner when required.
Owner Indicates the component that is responsible for streaming and freeing this component.

Defined in class Persistent

NamePath Used to serialize/unserialize. It returns the full path to identify this component.
Owner Owner of the component.

property Images (line 566)

ImageList Images

Lists the images that can appear beside individual menu items.

Use this property if you want to add images to your items. Set it to an ImageList object containing the images you want to use and use the ImageIndex of each item to set the image you want to show.

Info

  • access - protected

property Items (line 616)

item Items

Describes the elements of the menu.

Use Items to access information about the elements in the menu. Item contain information about Caption, associated image and Tag.

  1.  <?php
  2.  
  3.      function Unit467BeforeShow($sender$params)
  4.      {
  5.      $items=array();
  6.  
  7.      $subitems=array();
  8.      $subitems[]=array(
  9.             'Caption'=>'Sub Menu1',
  10.             'ImageIndex'=>0,
  11.             'SelectedIndex'=>0,
  12.             'StateIndex'=>-1,
  13.             'Tag'=>1
  14.      );
  15.  
  16.      $subitems[]=array(
  17.             'Caption'=>'Sub Menu2',
  18.             'ImageIndex'=>0,
  19.             'SelectedIndex'=>0,
  20.             'StateIndex'=>-1,
  21.             'Tag'=>2
  22.      );
  23.  
  24.      $items[]=array(
  25.             'Caption'=>'Top Menu',
  26.             'ImageIndex'=>0,
  27.             'SelectedIndex'=>0,
  28.             'StateIndex'=>-1,
  29.             'Tag'=>0,
  30.             'Items'=>$subitems
  31.      );
  32.  
  33.      $this->PopupMenu1->Items=$items;
  34.  
  35.      }
  36.  
  37.  ?>

Info

  • return - collection
  • access - protected

property Name

Specifies the name for the component. The name is used as an identifier and should be unique.
This property is implemented in Component::Name

property Tag

A versatile property of every Component that can be used in any way you want
This property is implemented in Component::Tag

property ComponentCount

Indicates the number of components owned by the component.
This property is implemented in Component::ComponentCount

property Components

Lists all the components owned by this component.
This property is implemented in Component::Components

property ControlState

A flag to know the state of the control, csLoading, csDesigning
This property is implemented in Component::ControlState

property DataFieldValue

This property returns the value of the datafield if any.
This property is implemented in Component::DataFieldValue

property NamePath

Specifies the path to uniquely identify a component, qualified by the owner when required.
This property is implemented in Component::NamePath

property Owner

Indicates the component that is responsible for streaming and freeing this component.
This property is implemented in Component::Owner

property NamePath

Used to serialize/unserialize. It returns the full path to identify this component.
This property is implemented in Persistent::NamePath

property Owner

Owner of the component.
This property is implemented in Persistent::Owner

Methods

Summary:
dumpFormItems Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components [Overrides Component::dumpFormItems()]
dumpHeaderCode Dumps header code required [Overrides Component::dumpHeaderCode()]
dumpJavascript Dumps the javascript code needed by this component [Overrides Component::dumpJavascript()]
init Initializes a component [Overrides Component::init()]
loaded Initializes the component after the form file has been read into memory. [Overrides Component::loaded()]

Defined in class Component

dumpChildrenJavascript Dumps the javascript code for all the children
dumpFormItems Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components
dumpHeaderCode Dumps header code required
dumpJavascript Dumps the javascript code needed by this component
hasValidDataField Returns true if a valid data field is attached to the component
init Initializes a component
loaded Initializes the component after the form file has been read into memory.
loadedChildren Calls childrens loaded
preinit Method called before init()
serializeChildren Serializes all children
unserializeChildren Unserializes all children by calling unserialize for all the components

Defined in class Persistent

serialize Stores this object into the session.
unserialize This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Defined in class Object

__construct Constructs an object and initializes its data before the object is first used.
className Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
classParent Returns the type of the immediate ancestor of a class.

Method dumpFormItems (line 475)

void dumpFormItems( )

Overrides : Component::dumpFormItems() Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components


Method dumpHeaderCode (line 480)

void dumpHeaderCode( )

Overrides : Component::dumpHeaderCode() Dumps header code required


Method dumpJavascript (line 383)

void dumpJavascript( )

Overrides : Component::dumpJavascript() Dumps the javascript code needed by this component


Method init (line 464)

void init( )

Overrides : Component::init() Initializes a component


Method loaded (line 458)

void loaded( )

Overrides : Component::loaded() Initializes the component after the form file has been read into memory.


Events

Summary:
OnClick Occurs when the user clicks the control.

property OnClick (line 637)

mixed OnClick

Occurs when the user clicks the control.

Use the OnClick event handler to respond when the user clicks the control.

Usually OnClick occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when:

The user selects an item in a grid, outline, list, or combo box by pressing an arrow key.

The user presses Spacebar while a button or check box has focus.

The user presses Enter when the active form has a default button (specified by the Default property).

The user presses Esc when the active form has a cancel button (specified by the Cancel property).

Info

  • return - Returns the event handler or null if no handler is set.
  • access - protected

Javascript Events

Summary:
OnClick OnJsClick event Occurs when the user clicks menu item.

property OnClick (line 644)

mixed OnClick

OnJsClick event Occurs when the user clicks menu item.

Info

  • access - protected


Documentation generated on Fri, 26 Dec 2008 11:45:38 +0100 by phpDocumentor 1.4.0a2