diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CCB9E780-C759-45B2-BBC8-7FAE2102C39F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CCB9E780-C759-45B2-BBC8-7FAE2102C39F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,22 @@ + + +Creating touch controls

Creating touch controls

When you design screen controls for touch-enabled devices, make them big enough to select with a finger.

+

Specifying text box size

Specify text box size in a CSS file.

.input_container input {
+	width: 100%;
+	height: 45px;
+	...
+
+}
+
+

Creating touch buttons

Create clickable HTML elements and make them big enough to select with a finger. Add a JavaScript onClick handler to the buttons to make them clickable.

For example, the following code creates two arrow buttons that users can press to change views.

<div id="navigationLeft" class="navigationBar">
+  <img id="arrowLeft" src="gfx/arrow_left.png" alt="Previous day" onclick="navigationArrowClicked('left');" />
+</div>
+
+<div id="navigationRight" class="navigationBar">
+  <img id="arrowRight" src="gfx/arrow_right.png" alt="Next day" onclick="navigationArrowClicked('right');" />
+</div>
+

Figure: Arrow buttons

You can also create custom controls. For more information, see Customizing screen controls.

+
\ No newline at end of file