summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TListBox/Home.page
blob: 776fc073a08634b00220a8495aa004e83cb5de23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<com:TContent ID="body">

<h1>TListBox Samples</h1>

<div class="samplepanel">
<div class="sampletitle"><tt>Single</tt> Selection List Box</div>
List box with default settings:<br/>
<com:TListBox />
<br/>

List box with initial items:<br/>
<com:TListBox>
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" />
</com:TListBox>
<br/>

List box with customized row number, color and font:<br/>
<com:TListBox Rows="3" ForeColor="blue" Font.Size="14pt">
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" />
</com:TListBox>
<br/>

Auto postback list box:<br/>
<com:TListBox AutoPostBack="true" SelectedIndexChanged="selectionChanged">
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" />
</com:TListBox>
<com:TLabel ID="SelectionResult" ForeColor="red" />
<br/>

List box's behavior upon postback:<br/>
<com:TListBox ID="ListBox1">
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" />
</com:TListBox>
<com:TButton Text="Submit" Click="buttonClicked"/>
<com:TLabel ID="SelectionResult2" ForeColor="red" />
<br/>
</div>

<div class="samplepanel">
<div class="sampletitle"><tt>Multiple</tt> Selection List Box</div>
<i>Use Shift + Left Click to change selection</i>
<br/>
List box with default settings:<br/>
<com:TListBox SelectionMode="Multiple" />
<br/>

List box with initial items:<br/>
<com:TListBox SelectionMode="Multiple">
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" Selected="true" />
</com:TListBox>
<br/>

Auto postback list box:<br/>
<br/>
<com:TListBox AutoPostBack="true" SelectionMode="Multiple" SelectedIndexChanged="multiSelectionChanged">
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" Selected="true" />
</com:TListBox>
<br/>
<com:TLabel ID="MultiSelectionResult" ForeColor="red" />
<br/>

List box's behavior upon postback:<br/>
<com:TListBox ID="ListBox2" SelectionMode="Multiple">
  <com:TListItem Value="value 1" Text="item 1" />
  <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  <com:TListItem Value="value 3" Text="item 3" />
  <com:TListItem Value="value 4" Text="item 4" Selected="true" />
</com:TListBox>
<com:TButton Text="Submit" Click="buttonClicked2" />
<br/>
<com:TLabel ID="MultiSelectionResult2" ForeColor="red" />

</div>
</com:TContent>