Graphics

 View Only
  • 1.  Text/Bar auto follow

    Posted 02-12-2018 22:10
    I am trying to make a text field that sits on a bar that follows the length of the text. I have sort of gotten it to work by making the quad/bar a child of the text. However, there are still issues with the left side of the bar not staying anchored to the left justified text. It seems to move slightly and not stay at a fixed position. I also have to make this for center and right justified text.

    Is there another way to do this other than making the bar a child of the text? I don't see where I can set an offset to determine the amount of space on the bar after the text ends.
    Does this have to be done with visual logic?

    Thanks


  • 2.  RE: Text/Bar auto follow

    Posted 02-13-2018 02:45
    Yes, visual logic is the way to go. Try linking the bounding box width of the text to the length of the bar. You may need to incorporate an offset to fine tune the length.
    #XPression


  • 3.  RE: Text/Bar auto follow

    Posted 02-13-2018 21:52
    Thanks. I thought there was a way to do it and avoid visual logic! Is the offset a setting within visual logic? I haven't seen an option for offset anywhere else yet.
    #XPression


  • 4.  RE: Text/Bar auto follow

    Posted 02-14-2018 02:46

    Yes, offset is a function block in the math folder on the right. I worked out the following. I started working on visual logic to allow for a line-break within the text, but didn't finish and now dinner is over! Check out the attached image and note the pivot point values for text and quad. Quad does need to start as a 1x1 quad. 


    #XPression


  • 5.  RE: Text/Bar auto follow

    Posted 02-14-2018 11:53
    The other method that I prefer is to make the bar full length and then push a mask along using boundingbox.width + offset and position of mask, it's less work in VL and has the added advantag that if you have a texture on the bar you want to grow you wont get stretching.

    If you do do it the way described in the earlier posts and you have a texture you'll want to offset the scaling buying using visual logic to change the texture cords scaling.
    #XPression


  • 6.  RE: Text/Bar auto follow

    Posted 04-19-2025 03:36

    I have two boxes. It's a center L3 with two lines. I need both bars to grow evenly with whichever text is longer. 

    I tried doing it the same way as shown, and while yes, the bar does grow with text, it grows too fast for the text. I tried playing with the offset, but I had no luck either under or over with the background bar. I added a Max Value, but it does not do anything. I'm sure it's a user error, but any would be great.

    Currently using Version 11.0



    ------------------------------
    Alejandro Galvan
    LA36 LOS ANGELES TV ACCESS
    ------------------------------



  • 7.  RE: Text/Bar auto follow

    Posted 04-20-2025 07:36



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 8.  RE: Text/Bar auto follow

    Posted 02-14-2018 12:18

    Here's an example of an auto grow bar like I described above that also pushes along an end cap. 


    #XPression


  • 9.  RE: Text/Bar auto follow

    Posted 02-14-2018 15:49
    thank you both for the info. I can't wait to try it!
    #XPression