summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Fundamentals
diff options
context:
space:
mode:
authorwei <>2005-12-28 22:41:20 +0000
committerwei <>2005-12-28 22:41:20 +0000
commitccdb91a35602377fe389c6c5b0945478929e0eca (patch)
tree2c52b7470892e7d1ea58bd4e99ae819fa6449845 /demos/quickstart/protected/pages/Fundamentals
parent6378fdf3eea7fd3bd00b590441b28c5b4915df5a (diff)
Adding TTextHighlighter for quickstart docs.
Diffstat (limited to 'demos/quickstart/protected/pages/Fundamentals')
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Components.page12
1 files changed, 6 insertions, 6 deletions
diff --git a/demos/quickstart/protected/pages/Fundamentals/Components.page b/demos/quickstart/protected/pages/Fundamentals/Components.page
index 20888fba..be71b18b 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Components.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Components.page
@@ -7,7 +7,7 @@ A component is an instance of <tt>TComponent</tt> or its child class. The base c
<h2>Component Properties</h2>
<p>
A component property can be viewed as a public variable describing a specific aspect of the component, such as the background color, the font size, etc. A property is defined by the existence of a getter and/or a setter method in the component class. For example, in <tt>TControl</tt>, we define its <tt>ID</tt> property using the following getter and setter methods,
-<pre class="source">
+<com:TTextHighlighter Language="php" CssClass="source">
class TControl extends TComponent {
public function getID() {
...
@@ -16,7 +16,7 @@ class TControl extends TComponent {
...
}
}
-</pre>
+</com:TTextHighlighter>
</p>
<p>
To get or set the <tt>ID</tt> property, do as follows, just like working with a variable,
@@ -58,20 +58,20 @@ Component events are special properties that take method names as their values.
</p>
<p>
A component event is defined by the existence of an <tt>on</tt>-method. For example, in <tt>TButton</tt>, we have
-<pre class="source">
+<com:TTextHighlighter Language="php" CssClass="source">
class TButton extends TWebControl {
public function onClick($param) {
...
}
}
-</pre>
+</com:TTextHighlighter>
This defines an event named <tt>Click</tt>, and a handler can be attached to the event using one of the following ways,
-<pre class="source">
+<com:TTextHighlighter Language="php" CssClass="source">
$button-&gt;Click=$callback;
$button-&gt;Click-&gt;add($callback);
$button-&gt;Click[]=$callback;
$button-&gt;attachEventHandler('Click',$callback);
-</pre>
+</com:TTextHighlighter>
where <tt>$callback</tt> refers to a valid PHP callback (e.g. a function name, a class method <tt>array($object,'method')</tt>, etc.)
</p>