# Tableview not resizing in Servoy 5

**URL:** <https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715>\
**Category:** Classic Servoy\
**Created:** [August 23, 2010, 2:21pm UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715 "2010-08-23T14:21:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [August 23, 2010, 2:21pm UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/1 "2010-08-23T14:21:54Z")

</div>

Hi all,

I have a tableview which is shown either wide (the whole way across the screen) or narrow (about 300 pixels wide). In Servoy 3.5, a script resizing the tab-panel in which I had placed the tableview would also cause the columns the tableview to resize to make them fit the narrower view. The tableview has scrollbars set to vertical:when needed and horizontal:never.

In Servoy 5.1.4, the columns simply stay the same width, chopping off anything beyond 300 pixels.  
How do I get around this issue?  
How do I set the column widths programatically?

Christian

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [September 21, 2010, 10:18am UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/2 "2010-09-21T10:18:42Z")

</div>

Still having this problem. The users are complaining they can’t resize the columns… ![:-(]( "Sad")

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [September 21, 2010, 10:27am UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/3 "2010-09-21T10:27:33Z")

</div>

I hope I understand right because you can set the anchors property of the columns to ‘TOP,RIGHT,LEFT’! This is fitting my columns in a table view list to the window size.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [September 21, 2010, 10:41am UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/4 "2010-09-21T10:41:05Z")

</div>

Hi Thomas,

I had anchored the columns in the table view. I tried taking some of the anchoring away and I can now move some of the columns… I can swap them around, but not actually resize them…

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [September 21, 2010, 10:58am UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/5 "2010-09-21T10:58:58Z")

</div>

In my solution I can only resize ‘LEFT,RIGHT’ anchored columns. Do you have checked the anchor property column by column (element by element)?

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [September 21, 2010, 1:26pm UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/6 "2010-09-21T13:26:32Z")

</div>

Hi Thomas,

Checking LEFT and RIGHT anchor on each element restores the behaviour my users are expecting.  
Thank you for your help!

By the way, is this documented anywhere?

C.

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [September 21, 2010, 1:45pm UTC](https://forum.servoy.com/t/tableview-not-resizing-in-servoy-5/12715/7 "2010-09-21T13:45:26Z")

</div>

> swingman:  
> Hi Thomas,
> 
> Checking LEFT and RIGHT anchor on each element restores the behaviour my users are expecting.  
> Thank you for your help!
> 
> By the way, is this documented anywhere?
> 
> C.

We’ll add this info in the wiki.
