# Center Contents Of A Vision List Component

**URL:** <https://forum.inductiveautomation.com/t/center-contents-of-a-vision-list-component/63054>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [August 16, 2022, 3:50pm UTC](https://forum.inductiveautomation.com/t/center-contents-of-a-vision-list-component/63054 "2022-08-16T15:50:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![israel.jordan](https://avatars.discourse-cdn.com/v4/letter/i/ce73a5/32.png) [@israel.jordan](https://forum.inductiveautomation.com/u/israel.jordan)\
**Post date:** [August 16, 2022, 3:50pm UTC](https://forum.inductiveautomation.com/t/center-contents-of-a-vision-list-component/63054/1 "2022-08-16T15:50:24Z")

</div>

Hello All,

I’m trying to center the contents of a List component in Vision. I was hoping to find something similar to what I would do with a label (using HTML tags `<html><center>`) but haven’t found any documentation on that. Is there anyone that can point me in the right direction or confirm that what I am trying cannot be done?

Thanks for your help on this!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 16, 2022, 4:22pm UTC](https://forum.inductiveautomation.com/t/center-contents-of-a-vision-list-component/63054/2 "2022-08-16T16:22:05Z")

</div>

I’m actually not really sure why the HTML method isn’t working, but with Vision, many things are possible. You could go from the component into it’s `viewport`, then `view` to get the actual JList component backing it. From there, you could call `setCellRenderer()` with an instance of [`ListCellRenderer`](https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/swing/ListCellRenderer.html) that does whatever you want.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 16, 2022, 4:22pm UTC](https://forum.inductiveautomation.com/t/center-contents-of-a-vision-list-component/63054/3 "2022-08-16T16:22:19Z")

</div>

It’s not exactly the same, but you can get the same look with a one-column table if you uncheck the `Header Visible` property and make the `Grid Line Color` transparent.

The table customizer will let you pick `Center` for a column’s `Horizontal Alignment`.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c74b1bc28efdfe9294640911c466306f5b4344cb.png)
