-
Posted by tekkguy on Fri, 04 Mar 2011 15:09:36
I am writing an AddOn where I am trying to utilize a MultiLineEditBox. I have an Array(Table) that has a list of strings. I want to fill the MultiLineEditBox with the strings from this table, 1 string per line. I looked through the book, but I can't find a section that shows how to access the object and it's properties... Forgive me again, I am new to this side of programming, just trying to get a handle on it. If someone could point me in the right direction?
For example, I would like to be able to do this: (Using Pseudocode here)
MultiLineEditBox.text = "" for each StringItem in Array MultiLineEditBox.text = MultiLineEditBox.text + chr(10) + StringItem end
-
Posted by jnwhiteh on Fri, 04 Mar 2011 15:11:08
I am writing an AddOn where I am trying to utilize a MultiLineEditBox. I have an Array(Table) that has a list of strings. I want to fill the MultiLineEditBox with the strings from this table, 1 string per line. I looked through the book, but I can't find a section that shows how to access the object and it's properties... Forgive me again, I am new to this side of programming, just trying to get a handle on it. If someone could point me in the right direction?
For example, I would like to be able to do this: (Using Pseudocode here)
MultiLineEditBox.text = "" for each StringItem in Array MultiLineEditBox.text = MultiLineEditBox.text + chr(10) + StringItem end
All you need to do is editbox:SetText(table.concat(yourArray, "\n"))