Widget Width

Width

Wednesday, November 30, 2005 by jlaj1989 | Discussion: DesktopX

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.
MountainDragon
Reply #1 Wednesday, November 30, 2005 6:26 PM
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.
jlaj1989
Reply #2 Wednesday, November 30, 2005 6:54 PM
I think that is what i want. Thanks ill try it.
jlaj1989
Reply #3 Wednesday, November 30, 2005 7:02 PM
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
CerebroJD
Reply #4 Wednesday, November 30, 2005 7:38 PM
Use this:
DesktopX.Object("ObjectToBeResized").Width = DesktopX.Object("TextObjectThatYouWantTheOtherToResizeTo").Width


Using it right now, should work for ya.
jlaj1989
Reply #5 Wednesday, November 30, 2005 7:55 PM
Yes this is what i want. Thank You Very Much
jlaj1989
Reply #6 Wednesday, November 30, 2005 7:55 PM
Yes this is what i want. Thank You Very Much
MountainDragon
Reply #7 Wednesday, November 30, 2005 8:37 PM
Sorry, my bad, I am so used to accessing the script namespace.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01