# G4P Library : GTextField text alignment

**URL:** <https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319>\
**Category:** Libraries\
**Created:** [November 4, 2021, 7:32pm UTC](https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319 "2021-11-04T19:32:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![R2processing](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@R2processing](https://discourse.processing.org/u/R2processing)\
**Post date:** [November 4, 2021, 7:32pm UTC](https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319/1 "2021-11-04T19:32:49Z")

</div>

Hello,

I’m using the useful G4P library.

using  
txfTEST = new GTextField(this, 10, 20, 70, 20);  
txfTEST.setText(strTEST);  
pnlCtrl.addControl(txfTEST);

allows me to define a GTextField object in the panel  
but the text is always aligned to the left.  
is it possible to align the text to the right in a GTextField object ?

Thanks for your answer.  
BR  
R2

---

<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:** [November 5, 2021, 2:00pm UTC](https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319/2 "2021-11-05T14:00:05Z")

</div>

Sorry its not possible to set the text alignment in a GTexfield control.

---

<div class="post-metadata">

**Author:** ![R2processing](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@R2processing](https://discourse.processing.org/u/R2processing)\
**Post date:** [November 9, 2021, 5:07am UTC](https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319/3 "2021-11-09T05:07:54Z")

</div>

OK,  
it’s not a big issue !

thanks  
R2
