summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages
diff options
context:
space:
mode:
authorxue <>2005-12-29 19:58:07 +0000
committerxue <>2005-12-29 19:58:07 +0000
commit94e49ca4633600269831c4e80af25ddcfa3a8258 (patch)
treeb31d0c1fd9ac7dfd12a75e42ba7d049a2b912178 /demos/quickstart/protected/pages
parentc38c1e6f271f73e5d9474e63bca227e2b7a30db8 (diff)
Added TTextBox demos.
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/Label.page23
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TextBox.page81
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TextBox.php16
-rw-r--r--demos/quickstart/protected/pages/Controls/Simple.page6
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Components.page2
5 files changed, 123 insertions, 5 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/Label.page b/demos/quickstart/protected/pages/Controls/Samples/Label.page
index 2fa77988..381541a0 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/Label.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/Label.page
@@ -3,28 +3,43 @@
<h1>TLabel Samples</h1>
<div class="samplepanel">
+
<com:TLabel
Text="This is a label with customized color and font."
ForeColor="yellow"
BackColor="blue"
Font.Name="Arial"
- Font.Size="12pt"
+ Font.Size="14pt"
/>
+
</div>
<div class="samplepanel">
+
<com:TLabel
Text="This is a form label associated with the TTextBox control below."
AssociatedControlID="test"
/>
-<br/>
-<com:TTextBox ID="test" />
+
+<br/><com:TTextBox ID="test" />
+
</div>
<div class="samplepanel">
-<com:TLabel>
+
+<com:TLabel ForeColor="blue" Style="color:red;">
This is a label with empty Text property and <b>nonempty body</b>.
</com:TLabel>
+
+</div>
+
+<div class="samplepanel">
+
+<com:TLabel
+ Text="This is a disabled label."
+ Enabled="false"
+/>
+
</div>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TextBox.page b/demos/quickstart/protected/pages/Controls/Samples/TextBox.page
new file mode 100644
index 00000000..43ab16f7
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TextBox.page
@@ -0,0 +1,81 @@
+<com:TContent ID="body">
+
+<h1>TTextBox Samples</h1>
+
+<div class="samplepanel">
+<div class="sampletitle">SingleLine and Password Text Boxes</div>
+
+Text box with default settings:
+<com:TTextBox />
+<br/>
+
+Password text box:
+<com:TTextBox TextMode="Password" />
+<br/>
+
+Text box with customized color, font, columns, maximum length:
+<com:TTextBox
+ Text="text"
+ ForeColor="yellow"
+ BackColor="blue"
+ Font.Size="14pt"
+ Columns="4"
+ MaxLength="6"
+/>
+<br/>
+
+Disabled text box:
+<com:TTextBox Text="disabled" Enabled="false" />
+<br/>
+
+Read-only text box:
+<com:TTextBox Text="read only" ReadOnly="true" />
+<br/>
+
+Auto postback text box:
+<com:TTextBox Text="change me" AutoPostBack="true" TextChanged="textChanged" />
+<br/>
+
+Text box's behavior upon postback:
+<com:TTextBox ID="TextBox1" Text="text" />
+<com:TButton Text="Submit" Click="submitText" />
+
+</div>
+
+<div class="samplepanel">
+<div class="sampletitle">MultiLine Text Boxes</div>
+
+Text box with default settings:<br/>
+<com:TTextBox TextMode="MultiLine" />
+<br/>
+
+Text box with customized dimensions, font and content:<br/>
+<com:TTextBox TextMode="MultiLine" Rows="6" Columns="60" Font.Italic="true">
+<prop:Text>
+This is a multiline text box.
+In HTML, it is displayed as a textarea.
+</prop:Text>
+</com:TTextBox>
+<br/>
+
+Disabled text box:<br/>
+<com:TTextBox
+ TextMode="MultiLine"
+ Text="disabled"
+ Enabled="false" />
+<br/>
+
+Read-only text box with text-wrapping disabled:<br/>
+<com:TTextBox
+ TextMode="MultiLine"
+ Text="This is a read-only text box with text-wrapping disabled."
+ ReadOnly="true"
+ Wrap="false"/>
+<br/>
+
+Auto postback text box:<br/>
+<com:TTextBox TextMode="MultiLine" Text="change me" AutoPostBack="true" TextChanged="textChanged" />
+<br/>
+</div>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TextBox.php b/demos/quickstart/protected/pages/Controls/Samples/TextBox.php
new file mode 100644
index 00000000..1e6478de
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TextBox.php
@@ -0,0 +1,16 @@
+<?php
+
+class TextBox extends TPage
+{
+ public function textChanged($sender,$param)
+ {
+ $sender->Text="text changed";
+ }
+
+ public function submitText($sender,$param)
+ {
+ $this->TextBox1->Text="You just entered '".$this->TextBox1->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 94061711..5a145102 100644
--- a/demos/quickstart/protected/pages/Controls/Simple.page
+++ b/demos/quickstart/protected/pages/Controls/Simple.page
@@ -8,4 +8,10 @@
</p>
<com:RunBar PagePath="Controls.Samples.Label" />
+<h2>TTextBox</h2>
+<p>
+<tt>TTextBox</tt> displays a text box on a Web page. The content in the text box is determined by the <tt>Text</tt> property. You can create a <tt>SingleLine</tt>, a <tt>MultiLine</tt>, or a <tt>Password</tt> text box by setting the <tt>TextMode</tt> property. The <tt>Rows</tt> and <tt>Columns</tt> properties specify their dimensions. If <tt>AutoPostBack</tt> is true, changing the content in the text box and then moving the focus out of it will cause postback action.
+</p>
+<com:RunBar PagePath="Controls.Samples.TextBox" />
+
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Fundamentals/Components.page b/demos/quickstart/protected/pages/Fundamentals/Components.page
index 56cf1671..32d82e1c 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Components.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Components.page
@@ -120,7 +120,7 @@ where <tt>ComponentType</tt> refers to a class name or a type name in namespace
<h3>Static Component Instantiation</h3>
<p>
Static component instantiation is about creating components via <a href="?page=Configurations.Overview">configurations</a>. The actual creation work is done by the PRADO framework. For example, in an <a href="?page=Configurations.AppConfig">application configuration</a>, one can configure a module to be loaded when the application runs. The module is thus a static component created by the framework. Static component instantiation is more commonly used in <a href="?page=Configurations.Templates1">templates</a>. Every component tag in a template specifies a component that will be automatically created by the framework when the template is loaded. For example, in a page template, the following tag will lead to the creation of a <tt>TButton</tt> component on the page,
-<com:TTextHighlighter CssClass="source">
+<com:TTextHighlighter Language="prado" CssClass="source">
&lt;com:TButton Text="Register" /&gt;
</com:TTextHighlighter>
</p>