# Scrollbars up and down to change the positions of the text

**URL:** <https://discourse.processing.org/t/scrollbars-up-and-down-to-change-the-positions-of-the-text/13521>\
**Category:** Processing for Android\
**Created:** [August 21, 2019, 1:11pm UTC](https://discourse.processing.org/t/scrollbars-up-and-down-to-change-the-positions-of-the-text/13521 "2019-08-21T13:11:14Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 23, 2019, 7:34pm UTC](https://discourse.processing.org/t/scrollbars-up-and-down-to-change-the-positions-of-the-text/13521/9 "2019-08-23T19:34:03Z")

</div>

From the example you need to init the class and display the scroll bar

This is the core line:

// Get the position of the img1 scrollbar  
// and convert to a value to display the img1 image  
float img1Pos = hs1.getPos()-width/2;

When you say println(img1Pos); you will see the values

Now use this value before text() command:

```auto
translate (0, img1Pos);

text( „Hello“, 22, 100);

```

---

_[View the full topic](https://discourse.processing.org/t/scrollbars-up-and-down-to-change-the-positions-of-the-text/13521)._
