# Centering TabStrip Menu?

**URL:** <https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275>\
**Category:** Ignition\
**Created:** [April 11, 2012, 10:06am UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275 "2012-04-11T10:06:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [April 11, 2012, 10:06am UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275/1 "2012-04-11T10:06:41Z")

</div>

is it possible to put the tab strip menu items at the center of the menu rectangle?

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [April 11, 2012, 3:50pm UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275/2 "2012-04-11T15:50:11Z")

</div>

Yes, you can center the tab strips. Select the tab strip in designer, move the arrows on the left or right of the selected tab strip until the selection box just fits the tabs. Once you have done this, click on Alignment and then select Center Horizontally. This can also be accomplished by pressing ALT+H. To keep the tabs centered on the client view, you can right click the tabs, select Layout, then Anchored, then select where you would like it to be anchored.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [April 11, 2012, 4:14pm UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275/3 "2012-04-11T16:14:19Z")

</div>

i populate dynamically the items in runtime, so i can’t know how many item there will be.  
they are aligned always on the left. if i have few items, i have the whole menu unbalanced on the left. this is not the best to have…

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 11, 2012, 5:30pm UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275/4 "2012-04-11T17:30:07Z")

</div>

I’ve added this feature request to our ticket system. There’s not really any work-around other than what’s been suggested.

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [April 11, 2012, 5:38pm UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275/5 "2012-04-11T17:38:29Z")

</div>

You would have to use scripting to make this work.

You would need to use  
system.gui.resizeComponent  
and  
system.gui.moveComponent

as an example, this was done with a button, and I think it could be made to work with the tab strip.

```
                       rc = event.source.parent [i]# reference to the component to print[/i]
                       w = rc.width
                       button = event.source.parent.getComponent('Tab Strip')
                       system.gui.resizeComponent(button, 900, 45)
                       newX = (w/2)-(button.width/2)
                       newY = button.y

                       system.gui.moveComponent(button, newX, newY)
```

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [April 12, 2012, 6:54am UTC](https://forum.inductiveautomation.com/t/centering-tabstrip-menu/4275/6 "2012-04-12T06:54:45Z")

</div>

yes, that’s what i had in mind, but before scripting i wanted to be sure there was no other way ![8)](https://us1.discourse-cdn.com/inductiveautomation/original/1X/587d7fe0d6822f36e81815ab06aa7164e9d2e057.gif "Cool")  
thank you very much.
