Category: How do I do X?
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Is it possible to set Edit widget or RichText readonly without making it disabled?

Issue

I have a chat window on my webpage and I want to make the chat history widget read-only. Disabling the widget is not an option because it becomes unusable. I am wondering if there is a way to make widgets read-only using JS code.

Resolution

The solution to making a chat history widget read-only in a chat window on a webpage involves using a Text widget and setting the Overflow Text property to Scroll and the Height to Fixed. Under Stye, disable the Bold and Italic formatting and use HTML tags to format the text. This will make the Text widget look almost identical to an Edit widget but the user will not be able to enter information. Additionally, placing the Text widget with scrolls inside a container makes it easier to manage the chat window. There is no need for JS code to make the widget read-only.