# TText, SetTextAlign

**URL:** <https://root-forum.cern.ch/t/ttext-settextalign/26042>\
**Category:** ROOT\
**Created:** [August 28, 2017, 11:37am UTC](https://root-forum.cern.ch/t/ttext-settextalign/26042 "2017-08-28T11:37:11Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [August 28, 2017, 3:06pm UTC](https://root-forum.cern.ch/t/ttext-settextalign/26042/5 "2017-08-28T15:06:24Z")

</div>

Why not just change the position in the constructor?

```auto
TText* t = new TText(.5,.1,cdate);
t->SetTextAlign(31);
t->SetTextColor(kBlue);
t->Draw();

```

Just FYI:

> [@Getting the same histograms after cuts](https://root-forum.cern.ch/t/getting-the-same-histograms-after-cuts/24719/2):
>
> Remark on the way to post code snippets: When you post pieces of code on the forum enclose it with ``` . That makes your post much more readable (I systematically edit your posts that way) . So do: ``` // this is a C++ piece of code. ``` And it will display as: // this is a C++ piece of code.

---

_[View the full topic](https://root-forum.cern.ch/t/ttext-settextalign/26042)._
