# How to dynamically resize GTextField?

**URL:** <https://discourse.processing.org/t/how-to-dynamically-resize-gtextfield/6353>\
**Category:** Libraries\
**Created:** [December 5, 2018, 11:19pm UTC](https://discourse.processing.org/t/how-to-dynamically-resize-gtextfield/6353 "2018-12-05T23:19:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![notcatfish2017](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@notcatfish2017](https://discourse.processing.org/u/notcatfish2017)\
**Post date:** [December 5, 2018, 11:19pm UTC](https://discourse.processing.org/t/how-to-dynamically-resize-gtextfield/6353/1 "2018-12-05T23:19:57Z")

</div>

Hi,

I’m using the G4P library and I’m trying to create a text field that will automatically resize when the user enters more and more text. However, I am unable to find a setWidth() method, is there any other way that I can implement this?

Thanks!

@quark (G4P creator please help!)

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [December 6, 2018, 12:24pm UTC](https://discourse.processing.org/t/how-to-dynamically-resize-gtextfield/6353/2 "2018-12-06T12:24:44Z")

</div>

It is not possible to resize a GTextfield once it has been created, but you can have a scrollbar automatically if the text gets too long.
