From e050f7f5e259ffc9df018a7021e8ed946b4d614e Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 31 Dec 2005 01:56:58 +0000 Subject: Added TDropDownList samples. --- .../quickstart/protected/pages/Controls/List.page | 9 ++- .../pages/Controls/Samples/TDropDownList/Home.page | 91 ++++++++++++++++++++++ .../pages/Controls/Samples/TDropDownList/Home.php | 22 ++++++ 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php (limited to 'demos/quickstart') diff --git a/demos/quickstart/protected/pages/Controls/List.page b/demos/quickstart/protected/pages/Controls/List.page index 4a3610fc..f305580b 100644 --- a/demos/quickstart/protected/pages/Controls/List.page +++ b/demos/quickstart/protected/pages/Controls/List.page @@ -1,14 +1,21 @@

List Controls

+

+List controls covered in this section are all inherit directly or indirectly from TDataBoundControl. Therefore, you can do various databinding operations with them. More details about databinding will be given in later sections. +

TListBox

-TListBox displays a list box that allows single or multiple selection. Set the property SelectionMode as Single to make a single selection list box, and Multiple a multiple selection list box. The items in the list box are represented by the Items property. The number of rows displayed in the box is specified via the Rows property value. Some other important properties that TListBox inherits from TListControl include: Items, SelectedIndex, SelectedIndices, SelectedItem, SelectedValue, AutoPostBack and CausesValidation. Note, since TDataBoundControl is an ancestor class of TListBox, you can do various databinding operations with a list box control. More details are covered in sections about databinding. +TListBox displays a list box that allows single or multiple selection. Set the property SelectionMode as Single to make a single selection list box, and Multiple a multiple selection list box. The items in the list box are represented by the Items property. The number of rows displayed in the box is specified via the Rows property value. Some other important properties that TListBox inherits from TListControl include: Items, SelectedIndex, SelectedIndices, SelectedItem, SelectedValue, AutoPostBack and CausesValidation.

TDropDownList

+

+TDropDownList displays a dropdown list box that allows users to select a single option from a few prespecified ones. The items in the list box are represented by the Items property. The selected item can be retrieved via SelectedItem property. If AutoPostBack is true, selection change will cause page postback. +

+

TCheckBoxList

diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page new file mode 100644 index 00000000..9b82a969 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.page @@ -0,0 +1,91 @@ + + +

TDropDownList Samples

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Dropdown list with default settings: + + +
+Dropdown list with initial items: + + + + + + + +
+List box with customized row number, color and font: + + + + + + + +
+Disabled Dropdown list: + + + + + + + +
+Auto postback Dropdown list: + + + + + + + + +
+Dropdown list's behavior upon postback: + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php new file mode 100644 index 00000000..3835d3c3 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TDropDownList/Home.php @@ -0,0 +1,22 @@ +SelectedIndex; + $value=$sender->SelectedValue; + $text=$sender->SelectedItem->Text; + $this->SelectionResult->Text="Your selection is (Index: $index, Value: $value, Text: $text)."; + } + + public function buttonClicked($sender,$param) + { + $index=$this->ListBox1->SelectedIndex; + $value=$this->ListBox1->SelectedValue; + $text=$this->ListBox1->SelectedItem->Text; + $this->SelectionResult2->Text="Your selection is (Index: $index, Value: $value, Text: $text)."; + } +} + +?> \ No newline at end of file -- cgit v1.2.3