0

Center Justify Text Widget?



Hi,

Is there a scripting method to center justify text in a text widget? It appears that the text is currently displayed as left justified in the defined rectangle area.

Thanks,

Paul

4 comments

  • 0
    Avatar
    RokuLyndon


    Currently, it's left justified. I'll ask if this can be added.
  • 0
    Avatar
    some_guy


    Thanks Lyndon.  For those of us being asked by clients to replicate DVD-style subtitles that would be very useful.



    Cheers,



    Paul
  • 0
    Avatar
    some_guy


    Hi Lyndon,



    Could you please show me where I would call SetSafeTextRegion to create a safe region inside the widget below?  I am doing something wrong - if I set up another rectangle called rectSafe to establish a 5 pixel safe zone and call text.SetSafeTextRegion(rectSafe) I see the gray Widget rectangle but get no longer see text displayed.

    '------ Create Text Widget
    rect=CreateObject("roRectangle", x+10, y+h-90, w-20, 80)
    text=CreateObject("roTextWidget", rect, 2, 1, 0)
    ok=text.SetFont("arial.ttf")
    text.SetForegroundColor(&hFFEBEBEB)
    text.SetBackgroundColor(&h80808080)
    text.Show()




    Thanks.



    Paul
  • 0
    Avatar
    RokuLyndon


    That all looks correct. I looked at the autorun file, and the call is normally made after the new rectangle has been created with the safe settings.
Please sign in to leave a comment.