Thread Tools Display Modes
02-24-10, 08:00 PM   #1
Xhelius
An Aku'mai Servant
Join Date: Jan 2010
Posts: 39
kgPanels text scripting

It's me again.

Ok I'm trying to get multiple lines of text in 1 panel through a script. Easy enough to get 1 line. self.text:SetText (). What if I wanted 2 lines or 3 lines? Adding more self.text:SetText() aren't displayed. kgPanels only displays the first self.text.SetText(). Any ideas?????
  Reply With Quote
02-24-10, 08:08 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You can use \n to indicate a new line.

Code:
print("This is \nsome test \ntext.")
give you...
This is
some test
text.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-24-10, 08:12 PM   #3
Xhelius
An Aku'mai Servant
Join Date: Jan 2010
Posts: 39
Doesn't print send the message to chat?

I'm wanting to seperate the RealZoneName from the SubZoneName and put them on seperate lines. Like

Dalaran
The Eventide

I can get the first line to show but the 2nd line won't.

**EDIT**
There isn't alot of information for text scripting =/
I may just consider trying to write an addon for my purposes that will do this. Doesn't appear any Location addons place the Zone and Subzone on different lines

Last edited by Xhelius : 02-24-10 at 09:51 PM.
  Reply With Quote
02-24-10, 09:54 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
print() was just an example of how to use \n
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-24-10, 10:01 PM   #5
Xhelius
An Aku'mai Servant
Join Date: Jan 2010
Posts: 39
Thanks Seerah, I can use print just fine and as long as I'm using just plain text \n works just fine. I was just trying to set something simple si I used:

zone =
GetMinimapZoneText()
subzone = GetSubZoneText()
self.text:SetText (Zone)

the above works great. For 1 line. Can't figue out how to add the subzone under it.

**EDIT** OK...self.text:SetText(Zone.."\n"..Subzone) works.

Thanks Seerah !



Last edited by Xhelius : 02-24-10 at 10:17 PM. Reason: Figured it out.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgPanels text scripting


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off