summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
diff options
context:
space:
mode:
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