diff options
7 files changed, 90 insertions, 2 deletions
diff --git a/.gitattributes b/.gitattributes index d6f48a47..7254d2f7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1276,6 +1276,7 @@ demos/quickstart/protected/pages/ActiveControls/ActiveCheckBox.page -text demos/quickstart/protected/pages/ActiveControls/ActiveCustomValidator.page -text demos/quickstart/protected/pages/ActiveControls/ActiveHyperLink.page -text demos/quickstart/protected/pages/ActiveControls/ActiveImage.page -text +demos/quickstart/protected/pages/ActiveControls/ActiveImageButton.page -text demos/quickstart/protected/pages/ActiveControls/ActivePager.page -text demos/quickstart/protected/pages/ActiveControls/AutoComplete.page -text demos/quickstart/protected/pages/ActiveControls/DragDrop.page -text @@ -1299,6 +1300,9 @@ demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImage/Home.page - demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImage/Home.php -text demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImage/hello_world.gif -text demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImage/hello_world2.gif -text +demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.page -text +demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.php -text +demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/hello_world.gif -text demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page -text demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.page -text demos/quickstart/protected/pages/ActiveControls/Samples/TAutoComplete/Home.php -text diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveImageButton.page b/demos/quickstart/protected/pages/ActiveControls/ActiveImageButton.page new file mode 100644 index 00000000..44b988dd --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveImageButton.page @@ -0,0 +1,17 @@ +<com:TContent ID="body" >
+
+<h1>TActiveImageButton</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveImageButton" />
+
+<p class="block-content">
+<tt>TActiveImageButton</tt> is the active counterpart of <tt>TImageButton</tt>.
+When a <tt>TActiveImageButton</tt> is clicked, rather than a normal post back request a callback request is initiated.
+The<tt>OnCallback</tt> event is raised during a callback request and it is raised <b>after</b> the <tt>OnClick</tt> event.
+</p>
+
+<p class="block-content">
+<tt>TActiveImageButton</tt> is similar to <tt>TActiveButton</tt>, except that <tt>TActiveImageButton</tt> displays the button as an image. The image is specified via <tt>ImageUrl</tt>, and the alternate text is specified by <tt>Text</tt>. In addition, it is possible to obtain the coordinate of the point where the image is clicked. The coordinate information is contained in the event parameter of the <tt>OnClick</tt> event (not <tt>OnCallback</tt>).
+</p>
+<com:RunBar PagePath="ActiveControls.Samples.TActiveImageButton.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page index 2b6fdac2..0490733b 100644 --- a/demos/quickstart/protected/pages/ActiveControls/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Home.page @@ -48,7 +48,7 @@ TActiveButton</a> control. See also the later part of the <a href="?page=Tutoria </li>
<li>
- * <a href="?page=ActiveControls.ActiveImageButton">TActiveImageButton</a>
+ <a href="?page=ActiveControls.ActiveImageButton">TActiveImageButton</a>
represents a click button that has an image as the background.
It is can be used to trigger a callback request.
</li>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.page new file mode 100644 index 00000000..8277a8cb --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.page @@ -0,0 +1,49 @@ +<com:TContent ID="body">
+
+<h1>TActiveImageButton Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A click image button showing the click location:
+</td><td class="sampleaction">
+<com:TActiveImageButton
+ ImageUrl=<%~ hello_world.gif %>
+ Text="hello world"
+ OnClick="buttonClicked"
+ />
+<com:TActiveLabel ID="Result" />
+</td></tr>
+
+<tr><td class="samplenote">
+A callback image button:
+</td><td class="sampleaction">
+<com:TActiveImageButton
+ ImageUrl=<%~ hello_world.gif %>
+ Text="hello world"
+ OnCallback="buttonClicked"
+ ActiveControl.CallbackParameter="value"
+ />
+<com:TActiveLabel ID="Result2" />
+</td></tr>
+
+<tr><td class="samplenote">
+An image button causing validation:
+</td><td class="sampleaction">
+<com:TActiveTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ Display="Dynamic"
+ ErrorMessage="input required in the textbox"
+ ValidationGroup="Group"
+ />
+<com:TActiveImageButton
+ ImageUrl=<%~ hello_world.gif %>
+ Text="hello world"
+ ValidationGroup="Group"
+ />
+</td></tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.php new file mode 100644 index 00000000..b1f2c53b --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/Home.php @@ -0,0 +1,18 @@ +<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ if($param instanceof TCallbackEventParameter)
+ {
+ $this->Result2->Text="Callback parameter: $param->CallbackParameter";
+ }
+ else
+ {
+ $this->Result->Text="You clicked at ($param->X,$param->Y)";
+ }
+ }
+}
+
+?>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/hello_world.gif b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/hello_world.gif Binary files differnew file mode 100644 index 00000000..bc81443c --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveImageButton/hello_world.gif diff --git a/framework/Web/UI/ActiveControls/TActiveImageButton.php b/framework/Web/UI/ActiveControls/TActiveImageButton.php index f8cd6e12..4e7b5149 100644 --- a/framework/Web/UI/ActiveControls/TActiveImageButton.php +++ b/framework/Web/UI/ActiveControls/TActiveImageButton.php @@ -13,7 +13,7 @@ /** * TActiveImageButton class. * - * TActiveImageButton is the active control counter part to TLinkButton. + * TActiveImageButton is the active control counter part to TImageButton. * When a TActiveImageButton is clicked, rather than a normal post back request a * callback request is initiated. * |