Game Development Community

TextList Columns

by Gustavo Boni · in Torque Game Builder · 02/15/2007 (7:40 am) · 5 replies

Hey guys, how can i add columns to this control?

I've tried to add tabs in my string but it didnt work.

#1
02/15/2007 (10:08 am)
If I'm not mistaken you have to set the number of columns on the control itself. I don't have the code in front of me so I can't check if that is even the right control. If it is though, you should be able to set the number of columns. Do you have a TGE license too? Check the server search gui.
#2
02/15/2007 (11:09 am)
Ops, sorry to create another thread with the same topic.

Searching the forum, i found a thread where some guys are saying that the coumsn field is just the number of pixels from the left of the list and to have columns i just need to add tbs to my string. Ok, but it is not working. what i did:

%text = "First Column" TAB "Second Column";

myList.addRow(0,%text);


I just get the "First Column" text being displayed.
#3
02/15/2007 (5:35 pm)
No, that's not enough. You need to specify the columns. You do this by specifying the starting pixel for each column. For instance:
columns = "0 305 370 500";
would give you four columns starting at each horizontal pixel value. Then setting the tabs delimits which text shows up in each column.
#4
02/15/2007 (6:17 pm)
Thank you very much Ben! Its working just perfectly now!
#5
02/16/2007 (2:18 am)
Cool beans!