Game Development Community

GuiTextList

by Daniel Brown · in Torque Game Engine · 07/19/2004 (9:15 am) · 5 replies

How do i add things to another column, i specify i want 3 columns but i cant find a way to add things to the second and thrid columns? Is this even possible?

#1
07/19/2004 (9:19 am)
Columns are seperated using /t.

eg:

" col1 /t col2 /t col3 "
#2
07/19/2004 (10:42 am)
I tried /t but it did not work, it just displayed the /t, but when i used \t everything after it dissapeard and couldnt be seen?? any idea whats goin on?
#3
07/19/2004 (11:28 am)
Is your GuiTextList a child of a scroll control?
#4
07/19/2004 (11:33 am)
In your declaration of the control... there is a "columns" field... see below.

(from debugger.ui)
new GuiTextListCtrl(DebuggerWatchView) {
						profile = "GuiTextListProfile";
						horizSizing = "right";
						vertSizing = "bottom";
						position = "0 0";
						extent = "640 8";
						minExtent = "8 8";
						visible = "True";
						setFirstResponder = "False";
						modal = "True";
						helpTag = "0";
						enumerate = "False";
						resizeCell = "True";
						columns = "0 200";
					};

The "columns" field denotes at what pixel (from the left) that each column will start.

How do you seperate data into columns? Use "TAB" between your row elements... Like so...

DebuggerWatchView.addRow(%temp[0], // ID for future reference
	   %temp[1] TAB                    // First column
	   %temp[2] TAB                    // Second colum
	   %temp[3]);                      // Not shown

%temp[1] will appear @ 0, %temp[2] will appear @ 200, and %temp[3] will not appear at all because you have no 3rd column defined.

Are you sure that's not the problem?
#5
07/19/2004 (1:34 pm)
Columns = "0 200"; thats where i was goin wrong! I thought it was the number of columns, thanks all! The colours of the font used are hardcoded arent they?