# Controlp5 TextAlign

**URL:** <https://discourse.processing.org/t/controlp5-textalign/2988>\
**Category:** Libraries\
**Created:** [August 26, 2018, 9:06am UTC](https://discourse.processing.org/t/controlp5-textalign/2988 "2018-08-26T09:06:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KeremTurkyilmaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/keremturkyilmaz/32/4433_2.png) [@KeremTurkyilmaz](https://discourse.processing.org/u/KeremTurkyilmaz)\
**Post date:** [August 26, 2018, 9:06am UTC](https://discourse.processing.org/t/controlp5-textalign/2988/1 "2018-08-26T09:06:04Z")

</div>

Hi Guys,

I’m trying to add a buttonRadio that control text Align, but I don’t know how to assign a variable that control the LEFT and CENTER button.

I’m using Processing width controlp5 library.

Thanks a lot.!

 ![0%201](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/ebcf41e126187cc9496a43fdcc37e70e0c8ed60a.jpeg)

---

<div class="post-metadata">

**Author:** ![TheWizardBear](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/thewizardbear/32/3552_2.png) [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Post date:** [September 2, 2018, 7:30pm UTC](https://discourse.processing.org/t/controlp5-textalign/2988/2 "2018-09-02T19:30:12Z")

</div>

I’m not sure if you can put a variable in textAlign(). However, you could create a variable (a boolean if you only need LEFT and CENTER) and when this variable changes, you change the the text align mode.  
E.g. if the variable is now true then run `textAlign(LEFT)` and if the variable is now false then run `textAlign(CENTER)`.
