5E Character Create Playlist
  1. #1

    Simple example of wrapping text label with scroll bar?

    I have a window that can display some text. The text can be any size and so may require multiple lines to display. I'd like to be able to display all the text, and if it doesn't fit in the windows current size, have the field show a scroll bar on the right. This is exactly the way a Story or Note text field works. However, both of those seem to be built on frames and I can't figure out how to duplicate the functionality on my simple text label field. (I'm calling it a label because you can't edit the text--it's for display only, but that may not be the right term in FG terms.)

    Can anyone point me to a good XML example in CoreRPG or 5E or an extension or anything that I can look at to see how this is done? I've searched and searched.

    Thanks.

  2. #2
    Quote Originally Posted by zuilin View Post
    I have a window that can display some text. The text can be any size and so may require multiple lines to display. I'd like to be able to display all the text, and if it doesn't fit in the windows current size, have the field show a scroll bar on the right. This is exactly the way a Story or Note text field works. However, both of those seem to be built on frames and I can't figure out how to duplicate the functionality on my simple text label field. (I'm calling it a label because you can't edit the text--it's for display only, but that may not be the right term in FG terms.)

    Can anyone point me to a good XML example in CoreRPG or 5E or an extension or anything that I can look at to see how this is done? I've searched and searched.

    Thanks.
    If you do a search on "scroll" you can see some examples of scroll fields like this... but I believe all are frame based.

    Code:
    			<scrollbar_record>
    				<target>text</target>
    			</scrollbar_record>
    Maybe if you delve into the templates they are using you can find some core code - but that's the only suggestion on how to find that I can think of.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #3
    Thanks. I'll muck around and see what I can make work.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Here's information on the scrollbar control: https://fantasygroundsunity.atlassia...rollbarcontrol

    You set the target control that this will be attached to.

    In CoreRPG (and rulesets layered on top) there's a template called scrollbar that has the code to set it to the right of the control it's anchored to. It's used with the control name to anchor to and the (same) control name as the target. For example, to add a scrollbarcontrol to the right side of a control called mytextlabel, use:

    Code:
    <scrollbar>
    	<anchored to="mytextlabel" />
    	<target>mytextlabel</target>
    </scrollbar>
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    Simple enough. Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in