summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
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/quickstart/protected/pages/Controls/Samples
parent5479507cbdcbc14685a443b1096171b5134f82bf (diff)
Added TPanel default button sample.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page15
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.php11
2 files changed, 26 insertions, 0 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