# How can I display scrollbars for a custom HTML control?

**URL:** <https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111>\
**Category:** Web SDK\
**Created:** [June 25, 2013, 3:58pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111 "2013-06-25T15:58:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Ashenhurst](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@John\_Ashenhurst](https://forum.xojo.com/u/John_Ashenhurst)\
**Post date:** [June 25, 2013, 3:58pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111/1 "2013-06-25T15:58:26Z")

</div>

How can I display scrollbars for a custom HTML control?

I used the WebSDK PDF help file to create an HTML control with 2-way communication with the browser. Works fine.

My problem is that the displayed HTML, one of several controls on the page, has no scrollbars and I can’t find any documentation that explains how to make them appear. I expected them to appear automatically when the HTML contents exceeded the size of the HTML area - but that doesn’t happen - so most of the HTML text is hidden from the user.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Antonio\_Rinaldi](https://forum.xojo.com/user_avatar/forum.xojo.com/antonio_rinaldi/32/331_2.png) [@Antonio\_Rinaldi](https://forum.xojo.com/u/Antonio_Rinaldi)\
**Post date:** [July 2, 2013, 3:59pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111/2 "2013-07-02T15:59:17Z")

</div>

Maybe a css overflow=auto for the HTML text div?

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [July 2, 2013, 4:02pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111/3 "2013-07-02T16:02:29Z")

</div>

The HTMLArea example just uses a DIV to show the HTML. It looks like you can add a scroll bar to a DIV by adding “overflow-y:scroll;” to the style

Which would change this line in HTMLArea.SetupHTML:

```auto
sty = " style=""opacity:0.5;cursor:default;overflow-y:scroll;"""
```

---

<div class="post-metadata">

**Author:** ![Antonio\_Rinaldi](https://forum.xojo.com/user_avatar/forum.xojo.com/antonio_rinaldi/32/331_2.png) [@Antonio\_Rinaldi](https://forum.xojo.com/u/Antonio_Rinaldi)\
**Post date:** [July 2, 2013, 4:04pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111/4 "2013-07-02T16:04:56Z")

</div>

Right scroll, not auto  
(don’t write to much things at the same time or you will write them in wrong places…)

---

<div class="post-metadata">

**Author:** ![John\_Ashenhurst](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/96bed5/32.png) [@John\_Ashenhurst](https://forum.xojo.com/u/John_Ashenhurst)\
**Post date:** [July 2, 2013, 9:14pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111/5 "2013-07-02T21:14:08Z")

</div>

Thanks. I’ve got scroll bars now and could change the background color.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 4:43pm UTC](https://forum.xojo.com/t/how-can-i-display-scrollbars-for-a-custom-html-control/9111/6 "2020-10-29T16:43:22Z")

</div>


