diff options
Diffstat (limited to 'demos/quickstart/protected/pages/Controls')
| -rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page | 69 | ||||
| -rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php | 14 | 
2 files changed, 83 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page new file mode 100644 index 00000000..b2fe4c6c --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.page @@ -0,0 +1,69 @@ +<com:TContent ID="body">
 +
 +<h1>TButton Samples</h1>
 +
 +<table class="sampletable">
 +
 +<tr><td class="samplenote">
 +Button with customized color, font, columns, maximum length:
 +</td><td class="sampleaction">
 +<com:TButton
 +	Text="text"
 +	Width="200px"
 +	ForeColor="silver"
 +	BackColor="black"
 +	Font.Size="14pt"
 +/>
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +A click button:
 +</td><td class="sampleaction">
 +<com:TButton Text="click me" Click="buttonClicked" />
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +A command button:
 +</td><td class="sampleaction">
 +<com:TButton
 +	Text="click me"
 +	Command="buttonClicked"
 +	CommandName="test"
 +	CommandParameter="value"
 +	/>
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +A button causing validation:
 +</td><td class="sampleaction">
 +<com:TTextBox ID="TextBox" />
 +<com:TRequiredFieldValidator
 +	ControlToValidate="TextBox"
 +	Display="Dynamic"
 +	ErrorMessage="input required in the textbox"
 +	ValidationGroup="Group"
 +	/>
 +<com:TButton Text="submit" ValidationGroup="Group" />
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +UseSubmitBehavior
 +</td><td class="sampleaction">
 +<com:TButton
 +	Text="click me"
 +	UseSubmitBehavior="false"
 +	Click="buttonClicked" />
 +</td></tr>
 +
 +<tr><td class="samplenote">
 +PostBackUrl
 +</td><td class="sampleaction">
 +<com:TButton
 +	Text="click me"
 +	PostBackUrl="/" />
 +</td></tr>
 +
 +
 +</table>
 +
 +</com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php new file mode 100644 index 00000000..f18072f2 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TButton/Home.php @@ -0,0 +1,14 @@ +<?php
 +
 +class Home extends TPage
 +{
 +	public function buttonClicked($sender,$param)
 +	{
 +		if($param instanceof TCommandEventParameter)
 +			$sender->Text="Name: {$param->CommandName}, Param: {$param->CommandParameter}";
 +		else
 +			$sender->Text="I'm clicked";
 +	}
 +}
 +
 +?>
\ No newline at end of file  | 
