summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorxue <>2005-12-31 15:49:32 +0000
committerxue <>2005-12-31 15:49:32 +0000
commit585c7308803c0ae51d5355d1712b0e3beb0a6bdf (patch)
treea0435f7d9a53d909d1a55f09c694a29a82c3d76d /demos
parent5479507cbdcbc14685a443b1096171b5134f82bf (diff)
Added TPanel default button sample.
Diffstat (limited to 'demos')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page15
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.php11
-rw-r--r--demos/quickstart/protected/pages/Controls/Simple.page2
3 files changed, 27 insertions, 1 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
index 7e5e8bcb..785e7ba4 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
@@ -51,6 +51,21 @@ This is panel content with a <com:TLabel Text="label" Font.Italic="true" />.
</com:TPanel>
</td></tr>
+<tr><td class="samplenote">
+Panel with a default button (hit 'enter' key to see what happened):
+</td><td class="sampleaction">
+<com:TPanel BackColor="#CCFFCC" DefaultButton="Button2" Width="400px">
+This is panel content with a <com:TLabel Text="label" Font.Italic="true" />
+and two buttons: <br/>
+<com:TButton ID="Button1" Text="button1" Click="buttonClicked" />
+<com:TButton ID="Button2" Text="button2" Click="buttonClicked" />
+<com:TLabel ID="Result" ForeColor="red" />
+<br/>
+When you change focus to the panel and hit 'enter' key, <tt>button2</tt>
+will be clicked because it is set as the default button of the panel.
+</com:TPanel>
+</td></tr>
+
</table>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.php
new file mode 100644
index 00000000..d6cf1bd5
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.php
@@ -0,0 +1,11 @@
+<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->Result->Text="You have clicked on '$sender->Text'.";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Simple.page b/demos/quickstart/protected/pages/Controls/Simple.page
index 2f0dc2f9..7ee79ac0 100644
--- a/demos/quickstart/protected/pages/Controls/Simple.page
+++ b/demos/quickstart/protected/pages/Controls/Simple.page
@@ -14,7 +14,7 @@
<h2>TPanel</h2>
<p>
-<tt>TPanel</tt>
+<tt>TPanel</tt> acts as a presentational container for other control. It displays a &lt;div&gt; element on a page. The property <tt>Wrap</tt> specifies whether the panel's body content should wrap or not, while <tt>HorizontalAlign</tt> governs how the content is aligned horizontally and <tt>Direction</tt> indicates the content direction (left to right or right to left). You can set <tt>BackImageUrl</tt> to give a background image to the panel, and you can ste <tt>GroupingText</tt> so that the panel is displayed as a field set with a legend text. Finally, you can specify a default button to be fired when users press 'return' key within the panel by setting the <tt>DefaultButton</tt> property.
</p>
<com:RunBar PagePath="Controls.Samples.TPanel.Home" />