# StringField Height

**URL:** <https://forum.inductiveautomation.com/t/stringfield-height/5139>\
**Category:** Module Development\
**Created:** [September 13, 2012, 4:12am UTC](https://forum.inductiveautomation.com/t/stringfield-height/5139 "2012-09-13T04:12:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [September 13, 2012, 4:12am UTC](https://forum.inductiveautomation.com/t/stringfield-height/5139/1 "2012-09-13T04:12:13Z")

</div>

In the settings page for a gateway configuration, I’d like to display a license file. I believe a StringField is the correct component for this. There is a method to set its width, but I can’t figure out how to set a height. Is there a way?

– chuck

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [September 18, 2012, 9:25pm UTC](https://forum.inductiveautomation.com/t/stringfield-height/5139/2 "2012-09-18T21:25:26Z")

</div>

Hi,

StringField is the data type for the persistent record, so I assume you’re building a RecordEditForm off this record, and hence the question. However, do you really want the License to be editable? Or are you just looking for a way to display it?

If you’re just trying to display the license, do you want it to be on its own page, or actually on the page where they set the various settings?

Regards,

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [September 30, 2012, 4:34am UTC](https://forum.inductiveautomation.com/t/stringfield-height/5139/3 "2012-09-30T04:34:58Z")

</div>

Hi Colby,

1. I’m just looking to display a non-editable field (a license statement) in the Gateway module parameters. It was no problem making it read-only. The only issue is the ability for the text box to wrap.
2. If there’s a better place to display the open-source info for a module, I’m open to suggestions.

— chuck

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 8, 2012, 8:35pm UTC](https://forum.inductiveautomation.com/t/stringfield-height/5139/4 "2012-10-08T20:35:03Z")

</div>

Hi,

If you have your own wicket page, one way or another (such as extending a RecordEditForm), a simple wicket label or something might be best. However, if you’re using a persistent record, and just want a quick solution, you can do this:

```auto
StringField myField = new StringField(...);

static {
    myField.getFormMeta().setEditorSource(new TextAreaEditorSource(20,45));
}
```

The parameters for TextAreadEditorSource are rows, cols. NOTE: When doing this, do NOT call StringField.setWidth as you were doing before. That function sets the editor back to a single line text box.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [October 14, 2012, 5:04am UTC](https://forum.inductiveautomation.com/t/stringfield-height/5139/5 "2012-10-14T05:04:38Z")

</div>

Thanks Colby. Works like a charm.  
— chuck
