How do I control the number of cols in a textarea?
Thanks David Thomas - CSS did it!

Since your comment is rather terse, I take the liberty of answering my own question where I describe how to use CSS in more detail.

To attach a CSS file, add the following to the form:

$form['#attached']['css'] = array(
  drupal_get_path('module', 'mymodule') . '/mymodule.css',
);


Then look at the HTML generated to find the class of the textarea:

&lt;textarea id="edit-mymodule-data" name="mymodule_data" cols="40" rows="2"
  class="form-textarea"&gt;
Please fill in some data.
&lt;/textarea&gt;


(Just for the record, notice that the values for cols and rows are picked up from the $form array, but unfortunately the value set for cols have no effect.)

The class of textarea is form-textarea, so placing the following in mymodule.css makes the textarea 100 pixels wide:

textarea.form-textarea { width: 100px; }