# currentcontroller.refresh() ?

**URL:** <https://forum.servoy.com/t/currentcontroller-refresh/1418>\
**Category:** Classic Servoy\
**Created:** [March 4, 2004, 2:11am UTC](https://forum.servoy.com/t/currentcontroller-refresh/1418 "2004-03-04T02:11:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattman](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mattman](https://forum.servoy.com/u/mattman)\
**Post date:** [March 4, 2004, 2:11am UTC](https://forum.servoy.com/t/currentcontroller-refresh/1418/1 "2004-03-04T02:11:56Z")

</div>

I’m working with moving objects around on a form. There are some cool things that could be done. However, I’m running into an issue.

Place a TEXT\_AREA field on a form and make it stretch from the leftmost edge to the rightmost. Name is ‘body’ in the name property. Meaning the body field covers the whole width of the form. Anchor is to the left, right, top and bottom.

Turn on scrollbars so the vertical is always (V:a H:wn)

Now run this code and you’ll find that your form will not refresh to show the scroll bar. It just looks like the field gets pushed to the right.

```auto
var x = elements.body.getLocationX();
var y = elements.body.getLocationY();
var w = elements.body.getWidth();
var h = elements.body.getHeight();

var a = 185; // The amount you'd like to shift an object over.

// Compare against it's original leftmost x coordinate.

if(x == 4){
	elements.body.setLocation(x + a, y);
	elements.body.setSize(w - a, h);
}else{
	elements.body.setLocation(x - a, y);
	elements.body.setSize(w + a, h);
}
application.showForm(letters_Edit);
application.output(x);

```

As you can see. I’ve tried the application.showForm() function to no avail. Is this a bug or is there another method for making sure the scrollbar, which gets moved off screen is refreshed.

Note: Swapping the .setSize and .setLocation does not fix this. You would think it would resize the field then move it and the scrollbar would stay. But it doesn’t work this way. Is this a bug? Need new method?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [March 9, 2004, 4:24pm UTC](https://forum.servoy.com/t/currentcontroller-refresh/1418/2 "2004-03-09T16:24:42Z")

</div>

fixed in RC9. will be layout/repainted now.
