summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TTextBox/Home.page
blob: 80d21122602deefba313630dc54f4c8245a063bb (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<com:TContent ID="body">

<h1>TTextBox Samples</h1>

<h2>SingeLine Text Boxes</h2>

<table class="sampletable">

<tr><td class="samplenote">
Text box with default settings:
</td><td class="sampleaction">
<com:TTextBox />
</td></tr>

<tr><td class="samplenote">
Text box with customized color, font, columns, maximum length:
</td><td class="sampleaction">
<com:TTextBox
	Text="text"
	ForeColor="yellow"
	BackColor="blue"
	Font.Size="14pt"
	Columns="4"
	MaxLength="6"
/>
</td></tr>

<tr><td class="samplenote">
Text box with vCard support:
</td><td class="sampleaction">
First Name: <com:TTextBox AutoCompleteType="FirstName" />
Last Name: <com:TTextBox AutoCompleteType="LastName" />
</td></tr>

<tr><td class="samplenote">
Disabled text box:
</td><td class="sampleaction">
<com:TTextBox Text="disabled" Enabled="false" />
</td></tr>

<tr><td class="samplenote">
Read-only text box:
</td><td class="sampleaction">
<com:TTextBox Text="read only" ReadOnly="true" />
</td></tr>

<tr><td class="samplenote">
Auto postback text box not causing validation:
</td><td class="sampleaction">
<com:TTextBox
	Text="change me"
	AutoPostBack="true"
	CausesValidation="false"
	OnTextChanged="textChanged" />
</td></tr>

<tr><td class="samplenote">
Auto postback text box causing validation:
</td><td class="sampleaction">
<com:TTextBox ID="TextBox3"
	Width="300px"
	AutoPostBack="true"
	ValidationGroup="Group1"
	Text="change me to 'test' and see" />
<com:TRequiredFieldValidator
	ControlToValidate="TextBox3"
	ErrorMessage="You must enter a value not equal to 'test'."
	InitialValue="test"
	ValidationGroup="Group1" />
</td></tr>

<tr><td class="samplenote">
Text box's behavior upon postback:
</td><td class="sampleaction">
<com:TTextBox ID="TextBox1" Text="text" />
<com:TButton
	Text="Submit"
	OnClick="submitText" />
</td></tr>

<tr><td class="samplenote">
Safety feature (cross-site scripting prevention):
</td><td class="sampleaction">
<com:TTextBox
	ID="TextBox2"
	AutoPostBack="true"
	Text="<a href=javascript:xxx>test</a>"
	Width="200px"/>
<b>SafeText:</b>
<com:TLabel ID="Output"
	BackColor="silver"
	Text=<%#$this->TextBox2->SafeText%> />
</td></tr>

</table>

<h2>Password Text Boxes</h2>

<table class="sampletable">

<tr><td class="samplenote">
Password with default setting
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Password" /> <com:TButton ID="PassButton1" Text="submit" />
</td></tr>

<tr><td class="samplenote">
Password with PersistPassword enabled
</td>
<td class="sampleaction">
<com:TTextBox ID="Password2" TextMode="Password" PersistPassword="true" /> 
<com:TButton ID="PassButton2" Text="submit" />
</td></tr>
</table>


<h2>MultiLine Text Boxes</h2>

<table class="sampletable">

<tr><td class="samplenote">
Text box with default settings:
</td><td class="sampleaction">
<com:TTextBox TextMode="MultiLine" />
</td></tr>

<tr><td class="samplenote">
Text box with customized dimensions, font and content:
</td><td class="sampleaction">
<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>
</td></tr>

<tr><td class="samplenote">
Disabled text box:
</td><td class="sampleaction">
<com:TTextBox
	TextMode="MultiLine"
	Text="disabled"
	Enabled="false" />
</td></tr>

<tr><td class="samplenote">
Read-only text box with text-wrapping disabled:
</td><td class="sampleaction">
<com:TTextBox
	TextMode="MultiLine"
	Text="This is a read-only text box with text-wrapping disabled."
	ReadOnly="true"
	Wrap="false"/>
</td></tr>

<tr><td class="samplenote">
Auto postback text box not causing validation:
</td><td class="sampleaction">
<com:TTextBox
	TextMode="MultiLine"
	Text="change me"
	AutoPostBack="true"
	CausesValidation="false"
	OnTextChanged="textChanged" />
</td></tr>

<tr><td class="samplenote">
Auto postback text box causing validation:
</td><td class="sampleaction">
<com:TTextBox ID="MultiTextBox3"
	TextMode="MultiLine"
	AutoPostBack="true"
	ValidationGroup="Group2"
	Text="change me to 'demo' and see" />
<com:TRequiredFieldValidator
	ControlToValidate="MultiTextBox3"
	ErrorMessage="You must enter a value not equal to 'demo'."
	InitialValue="demo"
	ValidationGroup="Group2" />
</td></tr>

</table>

<h2>Html5 new input types</h2>

<table class="sampletable">

<tr><td class="samplenote">
Color picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Color" Text="#FF0000" />
</td></tr>

<tr><td class="samplenote">
Date picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Date" />
</td></tr>

<tr><td class="samplenote">
Date, time and timezone picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Datetime" />
</td></tr>

<tr><td class="samplenote">
Local date and time picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="DatetimeLocal" />
</td></tr>

<tr><td class="samplenote">
Email validation textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Email" />
</td></tr>

<tr><td class="samplenote">
Month / year picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Month" />
</td></tr>

<tr><td class="samplenote">
Textbox optimized to input a number, usually with a spinner
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Number" Text="15" />
</td></tr>

<tr><td class="samplenote">
Textbox optimized to input a number, with properties min = 10, max = 20, step = 2
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Number" Text="15" Attributes.min="10" Attributes.max="20" Attributes.step="2" />
</td></tr>

<tr><td class="samplenote">
Textbox optimized to input a value inside a range, usually with a slider
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Range" Attributes.min="0" Attributes.max="100"/>
</td></tr>

<tr><td class="samplenote">
Textbox optimized to input a search term
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Search" />
</td></tr>

<tr><td class="samplenote">
Textbox optimized to input a telephone number
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Tel" />
</td></tr>

<tr><td class="samplenote">
Time picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Time" />
</td></tr>

<tr><td class="samplenote">
Textbox optimized to input an URL address
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Url" />
</td></tr>

<tr><td class="samplenote">
Week / year picker textbox
</td>
<td class="sampleaction">
<com:TTextBox TextMode="Week" />
</td></tr>

</table>
</com:TContent>