Textbox - Scrollbox

How is it possible to add a visual element “text” with a scrollbox? I need a fixed size of a textbox and the user to be able to scroll this thextbox.

1 Like

So a way our users have solved that in the past is to display the text in an html element, then you have more control. Can you try that? Not sure we want to expose a feature on the text element to do this, as it seems to be a pretty rare use case.

2 Likes

http://www.w3schools.com/html/html_formatting.asp
HTML element and activate ‘Display as an iFrame’.

    • Put your text in a database field
    • Use a multiline input and read the content from the database into it
    • Place an invisible block over the text so it can’t be edited

Just a workaround. Test that it will not modify it visually or in the database (permission)

5 Likes
  1. Take a rich text element
  2. disable input
  3. borders none
  4. place a white shape over the editor icons
  5. place your text in the initial content field

Now you have rich text instead of plain text.
Because it’s in the initial content you do not need to place it in a database field.
With states you can change the text in the conditions.

Best solution!!

Just to add some visual cues to this post - To achieve a scrolling like group…

image

Add a multi-line input, then feed in the ‘Initial content’ from a data type field.
Be sure to check ‘This input is disabled’ to stop user interaction with the multi-line input.

On the styling I suggest creating a new style where the element has no border or Conditional styling e.g. when hovered.

Thats it, nice and simple - no need for iFrames :slight_smile:
Hope this helps someone.

12 Likes

How did you make the data field to pass it into the initial content?

They added a new, easy way to do this and more with groups with anything but a “fixed” container layout (i.e. Row, Column, or Align to parent).

Just above the Margins section of the Layout tab there is a checkbox option that says “Allow vertical scrolling when content overflows.” Check this.

Add your long text box (or anything else that you want to be scrollable) into this group.

Next, limit how long the group is allowed to expand. (e.g. if your text box wants to be 500 pixels long and your group as an unlimited Max height or, say, a Max height of 800 pixels it will simply show the whole, long text box. If you shorten the Max height to 300 pixels, the text box is now too long to display all at once, so the group will gain a scroll bar and let your scroll down.

I just re-found this for myself today and am very happy about it =)

I hope this helps someone. :wink:

And in response to:

2 Ways that come to mind (but i hope my previous explanation works better for you):

  1. Add a Type called something like “Text for Scroll Displays”
  • Give it 2 Text fields
    • Body Text (for the text you want to display)
    • Name (a name for what this text is for)
  • Manually create a new entry in your database for each instance of text you want to display
  • Now go to wherever you want to display text and do a search for "“Text for Scroll Displays” and select for Name = (whichever entry you need)
  • This will return a “list of Text for Scroll Displays” so take the :first item and that should be the text you wanted.
  1. You could add it in an option set such as “OS Text for Scrolling Text.”
  • Use the display spot to name what the text is for.
  • Then add another text field and put the text you wish to display there.
  • Now use whatever approach you want (Multi-line input or Repeating Group) and for the data source, use “get an option” to select your option set and then select the right text entry, then select that entry’s Text.

(Thankfully this is not necessary :wink: )