Reply
 
Thread Tools Display Modes
Unread 01-30-12, 08:03 PM   #1
Melampus
Zombie
 
Melampus's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2011
Posts: 2
Wordwrap usage

It's for Guild Crafting Helper.

I add that segment, however it does not seem to work for me. The text still truncates on the single line... Here is the code I have so far

Code:
--- This segment reads from the fields from a datafile
--- If you notice ... I added a second 'null' line to make sure I could see any new text on the next line

if t[i].mType == (value1) and t[i].slot == (value2) then
			pid = pid.."\n".."\n"..t[i].id
			pmaker = pmaker.."\n".."\n"..t[i].maker
			pname = pname.."\n".."\n"..t[i].name
			pskill = pskill.."\n".."\n"..t[i].skill
			pslot = pslot.."\n".."\n"..(string.sub(t[i].slot, 5))
			pstatname = pstatname.."\n".."\n"..t[i].statname
			pmType = pmType.."\n".."\n"..t[i].mType
			i = i + 1
			end

				end
	--	return
	
	window.item1:SetText(pname)
	wordwrap = window.item1:GetWordwrap()
	window.item1:SetWordwrap(wordwrap)
	window.item2:SetText(pskill)
	wordwrap = window.item2:GetWordwrap()
	window.item2:SetWordwrap(wordwrap)
	window.item3:SetText(pslot)
	wordwrap = window.item3:GetWordwrap()
	window.item3:SetWordwrap(wordwrap)

	-------- Get the wordwrap status and use it for multiple makers	

	window.item4:SetText(pstatname)
	wordwrap = window.item4:GetWordwrap()
	window.item4:SetWordwrap(wordwrap)
	------- Is there another way to use this? I tried to use it window.item4:SetWordwrap(pstatname)...that crated an error

             window.item5:SetText(pmaker)
	wordwrap = window.item5:GetWordwrap()
	window.item5:SetWordwrap(wordwrap)

I have a feeling that I am just not calling it to set the flag correctly.
Melampus is offline   Reply With Quote
Unread 01-31-12, 04:19 PM   #2
Myrroddin
Endless Captain
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 50
:GetWordwrap returns the values of true or false. SetWordwrap(true) to enable, or SetWordwrap(false) to disable.
Code:
window.item1:SetText(pname)
window.item1:SetWordwrap(true)
window.item2:SetText(pskill)
window.item2:SetWordwrap(true)
Myrroddin is offline   Reply With Quote
Reply

Go BackRiftui » AddOns, Layouts and Macros » Help/Support » Rift addon using wordwrap

Thread Tools
Display Modes

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