Creating Properties for Custom Components

From RadPHP XE2 Documentation
Jump to: navigation, search

Summary: Describes how to create properties for custom components.


To create a property for a custom component

  • Open the source code file in the "Code Editor".
  • Choose

Edit PathPDF.jpg Add New Property .This opens the "Add New Property to Source Code" dialog box.

  • Type a name for the new property default value for the new property.
  • Click "OK".

The code for the property is automatically entered into the source code. For example, a Color property with a default value of green would generate the following code:

private $_color="Green";
 
function getColor() 
{
  return $this->_color; 
}
 
function setColor($value) 
{ 
  $this->_color=$value; 
}
 
function defaultColor() 
{
  return Green; 
}

You can modify the property in the source code as necessary.

See also

Installing Custom Components

Adding an Image Icon to a Component

Saving Custom Components

Setting Component Properties

Personal tools