Widget Width

Width

If you have text is there a way to make so the background width changes the text. And if you change the text it will automaticly change the size of the background width. Let me know if you need more explanation.
1,974 views 7 replies
Reply #1 Top
I'm not totally sure what you're looking to do, but if you create an object, set its Appearance Type to Text, set the format as you like it (left,centered, right) you can then use the script to set the content of the text, and set the width. It will word wrap if the width is set to less than the length of your text, and if you want a line break, code it like this:

Object.Text = "This is line one"&chr(13)&"this is line two"

To set the object's properties from another object, use DesktopX.ScriptObject("objectname").Text (or .Width)

Hope this helps.
Reply #2 Top
I think that is what i want. Thanks ill try it.
Reply #3 Top
This dosent work for some reason.

To set the object's properties from another object, use DesktopX.ScriptObject("objectname").Text (or .Width)


This is what i typed in:

'Called when the script is executed
Sub Object_OnScriptEnter
DesktopX.ScriptObject("Test").Width = 100
End Sub

'Called when the script is terminated
Sub Object_OnScriptExit

End Sub
Reply #4 Top
Use this:
DesktopX.Object("ObjectToBeResized").Width = DesktopX.Object("TextObjectThatYouWantTheOtherToResizeTo").Width


Using it right now, should work for ya.
Reply #5 Top
Yes this is what i want. Thank You Very Much
Reply #6 Top
Yes this is what i want. Thank You Very Much
Reply #7 Top
Sorry, my bad, I am so used to accessing the script namespace.